public class StreamTypeServiceImpl extends java.lang.Object implements StreamTypeService
Constructor and Description |
---|
StreamTypeServiceImpl(EventType[] eventTypes,
java.lang.String[] streamNames,
boolean[] isIStreamOnly,
java.lang.String engineURI,
boolean isOnDemandStreams)
Ctor.
|
StreamTypeServiceImpl(EventType eventType,
java.lang.String streamName,
boolean isIStreamOnly,
java.lang.String engineURI)
Ctor.
|
StreamTypeServiceImpl(java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> namesAndTypes,
java.lang.String engineURI,
boolean isStreamZeroUnambigous,
boolean requireStreamNames)
Ctor.
|
StreamTypeServiceImpl(java.lang.String engineURI,
boolean isOnDemandStreams)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEngineURIQualifier() |
EventType[] |
getEventTypes()
Returns an array of event types for each event stream in the order declared.
|
boolean[] |
getIStreamOnly()
Returns true for each stream without a data window.
|
java.lang.String[] |
getStreamNames()
Returns an array of event stream names in the order declared.
|
int |
getStreamNumForStreamName(java.lang.String streamWildcard) |
boolean |
hasPropertyAgnosticType() |
boolean |
isOnDemandStreams() |
PropertyResolutionDescriptor |
resolveByPropertyName(java.lang.String propertyName,
boolean obtainFragment)
Returns the offset of the stream and the type of the property for the given property name,
by looking through the types offered and matching up.
|
PropertyResolutionDescriptor |
resolveByPropertyNameExplicitProps(java.lang.String propertyName,
boolean obtainFragment)
Returns the offset of the stream and the type of the property for the given property name,
by looking through the types offered considering only explicitly listed properties and matching up.
|
PropertyResolutionDescriptor |
resolveByStreamAndPropName(java.lang.String streamAndPropertyName,
boolean obtainFragment)
Returns the offset of the stream and the type of the property for the given property name,
by looking through the types offered and matching up.
|
PropertyResolutionDescriptor |
resolveByStreamAndPropName(java.lang.String streamName,
java.lang.String propertyName,
boolean obtainFragment)
Returns the offset of the stream and the type of the property for the given property name,
by using the specified stream name to resolve the property.
|
PropertyResolutionDescriptor |
resolveByStreamAndPropNameExplicitProps(java.lang.String streamName,
java.lang.String propertyName,
boolean obtainFragment)
Returns the offset of the stream and the type of the property for the given property name,
by using the specified stream name to resolve the property and considering only explicitly listed properties.
|
void |
setRequireStreamNames(boolean requireStreamNames) |
void |
setStreamZeroUnambigous(boolean streamZeroUnambigous) |
public StreamTypeServiceImpl(java.lang.String engineURI, boolean isOnDemandStreams)
engineURI
- engine URIisOnDemandStreams
- public StreamTypeServiceImpl(EventType eventType, java.lang.String streamName, boolean isIStreamOnly, java.lang.String engineURI)
eventType
- a single event type for a single streamstreamName
- the stream name of the single streamengineURI
- engine URIisIStreamOnly
- true for no datawindow for streampublic StreamTypeServiceImpl(EventType[] eventTypes, java.lang.String[] streamNames, boolean[] isIStreamOnly, java.lang.String engineURI, boolean isOnDemandStreams)
eventTypes
- - array of event types, one for each streamstreamNames
- - array of stream names, one for each streamisIStreamOnly
- true for no datawindow for streamengineURI
- - engine URIisOnDemandStreams
- - true to indicate that all streams are on-demand pull-basedpublic StreamTypeServiceImpl(java.util.LinkedHashMap<java.lang.String,Pair<EventType,java.lang.String>> namesAndTypes, java.lang.String engineURI, boolean isStreamZeroUnambigous, boolean requireStreamNames)
namesAndTypes
- is the ordered list of stream names and event types available (stream zero to N)isStreamZeroUnambigous
- indicates whether when a property is found in stream zero and another stream an exception should be
thrown or the stream zero should be assumedengineURI
- uri of the enginerequireStreamNames
- is true to indicate that stream names are required for any non-zero streams (for subqueries)public void setRequireStreamNames(boolean requireStreamNames)
public boolean isOnDemandStreams()
isOnDemandStreams
in interface StreamTypeService
public EventType[] getEventTypes()
StreamTypeService
getEventTypes
in interface StreamTypeService
public java.lang.String[] getStreamNames()
StreamTypeService
getStreamNames
in interface StreamTypeService
public boolean[] getIStreamOnly()
StreamTypeService
getIStreamOnly
in interface StreamTypeService
public int getStreamNumForStreamName(java.lang.String streamWildcard)
getStreamNumForStreamName
in interface StreamTypeService
public PropertyResolutionDescriptor resolveByPropertyName(java.lang.String propertyName, boolean obtainFragment) throws DuplicatePropertyException, PropertyNotFoundException
StreamTypeService
This method considers only a property name and looks at all streams to resolve the property name.
resolveByPropertyName
in interface StreamTypeService
propertyName
- - property name in eventDuplicatePropertyException
- to indicate property was found twicePropertyNotFoundException
- to indicate property could not be resolvedpublic PropertyResolutionDescriptor resolveByPropertyNameExplicitProps(java.lang.String propertyName, boolean obtainFragment) throws PropertyNotFoundException, DuplicatePropertyException
StreamTypeService
This method considers only a property name and looks at all streams to resolve the property name.
resolveByPropertyNameExplicitProps
in interface StreamTypeService
propertyName
- - property name in eventPropertyNotFoundException
- to indicate property could not be resolvedDuplicatePropertyException
- to indicate property was found twicepublic PropertyResolutionDescriptor resolveByStreamAndPropName(java.lang.String streamName, java.lang.String propertyName, boolean obtainFragment) throws PropertyNotFoundException, StreamNotFoundException
StreamTypeService
This method considers and explicit stream name and property name, both parameters are required.
resolveByStreamAndPropName
in interface StreamTypeService
streamName
- - name of stream, requiredpropertyName
- - property name in event, , requiredPropertyNotFoundException
- to indicate property could not be resolvedStreamNotFoundException
- to indicate stream name could not be resolvedpublic PropertyResolutionDescriptor resolveByStreamAndPropNameExplicitProps(java.lang.String streamName, java.lang.String propertyName, boolean obtainFragment) throws PropertyNotFoundException, StreamNotFoundException
StreamTypeService
This method considers and explicit stream name and property name, both parameters are required.
resolveByStreamAndPropNameExplicitProps
in interface StreamTypeService
streamName
- - name of stream, requiredpropertyName
- - property name in event, , requiredPropertyNotFoundException
- to indicate property could not be resolvedStreamNotFoundException
- to indicate stream name could not be resolvedpublic PropertyResolutionDescriptor resolveByStreamAndPropName(java.lang.String streamAndPropertyName, boolean obtainFragment) throws DuplicatePropertyException, PropertyNotFoundException
StreamTypeService
This method considers a single property name that may or may not be prefixed by a stream name. The resolution first attempts to find the property name itself, then attempts to consider a stream name that may be part of the property name.
resolveByStreamAndPropName
in interface StreamTypeService
streamAndPropertyName
- - stream name and property name (e.g. s0.p0) or just a property name (p0)DuplicatePropertyException
- to indicate property was found twicePropertyNotFoundException
- to indicate property could not be resolvedpublic java.lang.String getEngineURIQualifier()
getEngineURIQualifier
in interface StreamTypeService
public boolean hasPropertyAgnosticType()
hasPropertyAgnosticType
in interface StreamTypeService
public void setStreamZeroUnambigous(boolean streamZeroUnambigous)