Package com.streambase.liveview.client
Interface Table
-
- All Known Implementing Classes:
AbstractTable
public interface Table
An instance of a LiveView table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Table.TableGroup
ENUM for table groups.static class
Table.TableStatus
-
Field Summary
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Timestamp
getCreateTime()
Returns the time when the table was createdString
getDescription()
A description of the tableList<Schema.Field>
getFields()
Returns the fields describing the table columns.List<Schema.Field>
getFields(boolean includeInternal)
Returns the fields describing the table columns.String
getFilter()
Returns the filter on the base tableString
getGroup()
A table can be assigned to a logical group.List<List<String>>
getIndices()
Returns all the indices for the table.List<Schema.Field>
getKeyFields()
Returns the schema which describes the key for the records in this table.String
getKeyFieldsCsv()
Returns the key fields table in the form of CSV.String
getName()
The name of the table.EnumSet<LiveViewQueryLanguage>
getQueryLanguages()
Returns the languages that can be used for queries against this table.Map<String,List<SemanticInterpretation>>
getSemanticInterpretationMap()
A map of semantic interpretation, where the key is the field name, and the value is a list of semantic interpretation for that field.String
getShortDescription()
A short description of the tableEnumSet<LiveViewTableCapability>
getTableCapabilities()
Returns the capabilities that this Table supports.TablePublisher
getTablePublisher(String publisherName)
Retrieve a publisher instance allowing a client to publish data to this table with the default buffer sizeTablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT
and flush intervalTablePublisher.PUBLISH_INTERVAL_DEFAULT
.TablePublisher
getTablePublisher(String publisherName, int bufferSize, long flushInterval, TimeUnit flushIntervalTimeUnit)
Retrieve aTablePublisher
instance allowing the client to publish data to the table.TablePublisher
getTablePublisher(String publisherName, int bufferSize, long flushInterval, TimeUnit flushIntervalUnit, PublisherListener pubListener, PubListenerConfig pubListenerConfig)
Retrieve aTablePublisher
publisher instance allowing the client to publish data to the table.TablePublisher
getTablePublisher(String publisherName, PublisherListener pubListener, PubListenerConfig pubListenerConfig)
Retrieve aTablePublisher
instance allowing a client to publish data to this table with the default buffer sizeTablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT
and flush intervalTablePublisher.PUBLISH_INTERVAL_DEFAULT
.String
getTableSpaceRef()
Returns the table space reference for the given table.Table.TableStatus
getTableStatus()
Get the status of the table.String
getTableStatusMessage()
Returns the table status message.Collection<String>
getUnmetClientCapabilities()
Every table might have requiredClientCapabilities which may not be supported by the current client.boolean
isEnabled()
Sometimes Tables will be disabled, because the Container that they are in has been shut down.boolean
isSystemTable()
Returns true if the table is a system table.
-
-
-
Field Detail
-
LV_STATS_TABLE
static final String LV_STATS_TABLE
- See Also:
- Constant Field Values
-
LV_ALERTS_TABLE
static final String LV_ALERTS_TABLE
- See Also:
- Constant Field Values
-
TABLES_TABLE_NAME
static final String TABLES_TABLE_NAME
A special group used to identify system tables in LiveView.- See Also:
- Constant Field Values
-
NAME_FIELD
static final String NAME_FIELD
- See Also:
- Constant Field Values
-
GROUP_FIELD
static final String GROUP_FIELD
- See Also:
- Constant Field Values
-
TABLE_SPACE_FIELD
static final String TABLE_SPACE_FIELD
- See Also:
- Constant Field Values
-
DESCRIPTION_FIELD
static final String DESCRIPTION_FIELD
- See Also:
- Constant Field Values
-
SHORT_DESCRIPTION_FIELD
static final String SHORT_DESCRIPTION_FIELD
- See Also:
- Constant Field Values
-
QUERY_LANGUAGES_FIELD
static final String QUERY_LANGUAGES_FIELD
- See Also:
- Constant Field Values
-
CAPABILITIES_FIELD
static final String CAPABILITIES_FIELD
- See Also:
- Constant Field Values
-
IS_ENABLED_FIELD
static final String IS_ENABLED_FIELD
- See Also:
- Constant Field Values
-
FIELDLIST_FIELD
static final String FIELDLIST_FIELD
- See Also:
- Constant Field Values
-
TABLE_SCHEMA_FIELD
static final String TABLE_SCHEMA_FIELD
- See Also:
- Constant Field Values
-
KEY_FIELDS_CSV
static final String KEY_FIELDS_CSV
- See Also:
- Constant Field Values
-
REQUIRED_CLIENT_CAPABILITIES
static final String REQUIRED_CLIENT_CAPABILITIES
- See Also:
- Constant Field Values
-
INDICES_FIELD
static final String INDICES_FIELD
- See Also:
- Constant Field Values
-
STATUS_FIELD
static final String STATUS_FIELD
- See Also:
- Constant Field Values
-
STATUS_MESSAGE_FIELD
static final String STATUS_MESSAGE_FIELD
- See Also:
- Constant Field Values
-
IS_SYSTEM_TABLE
static final String IS_SYSTEM_TABLE
- See Also:
- Constant Field Values
-
CREATE_TIME
static final String CREATE_TIME
- See Also:
- Constant Field Values
-
FILTER
static final String FILTER
- See Also:
- Constant Field Values
-
NUM_SERVERS
static final String NUM_SERVERS
- See Also:
- Constant Field Values
-
REJECTED_SERVERS
static final String REJECTED_SERVERS
- See Also:
- Constant Field Values
-
TABLE_SEMANTIC_INTERPRETATION
static final String TABLE_SEMANTIC_INTERPRETATION
- See Also:
- Constant Field Values
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELD_NAME_NAME
static final String TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELD_NAME_NAME
- See Also:
- Constant Field Values
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_INTERPRETATION_NAME
static final String TABLE_SEMANTIC_INTERPRETATION_ELEMENT_INTERPRETATION_NAME
- See Also:
- Constant Field Values
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELDS
static final Schema.Field[] TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELDS
-
SM_DISCOVERD_AT_START
static final String SM_DISCOVERD_AT_START
- See Also:
- Constant Field Values
-
SM_REMOVING
static final String SM_REMOVING
- See Also:
- Constant Field Values
-
SM_DEFINED
static final String SM_DEFINED
- See Also:
- Constant Field Values
-
SM_LOADING
static final String SM_LOADING
- See Also:
- Constant Field Values
-
SM_TABLE_CONTAINER_MISSING
static final String SM_TABLE_CONTAINER_MISSING
- See Also:
- Constant Field Values
-
SM_DYANAMICALLY_ADDED
static final String SM_DYANAMICALLY_ADDED
- See Also:
- Constant Field Values
-
SM_FILTERED_TABLE_DISCOVERED_AT_START_TIME
static final String SM_FILTERED_TABLE_DISCOVERED_AT_START_TIME
- See Also:
- Constant Field Values
-
SM_FILTERED_TABLE_ERROR_PREDICATE_VALIDATION
static final String SM_FILTERED_TABLE_ERROR_PREDICATE_VALIDATION
- See Also:
- Constant Field Values
-
SM_FILTERED_TABLE_DYNAMICALLY_ADDED
static final String SM_FILTERED_TABLE_DYNAMICALLY_ADDED
- See Also:
- Constant Field Values
-
SYS_TABLES_GROUP
static final String SYS_TABLES_GROUP
- See Also:
- Constant Field Values
-
CEP_TABLES_GROUP
static final String CEP_TABLES_GROUP
- See Also:
- Constant Field Values
-
LIVEVIEW_LANGUAGE_ONLY
static final EnumSet<LiveViewQueryLanguage> LIVEVIEW_LANGUAGE_ONLY
-
REAL_LV_CAPABILITIES
static final EnumSet<LiveViewTableCapability> REAL_LV_CAPABILITIES
-
CAPABILITIES_FOR_FILTERED_TABLES
static final EnumSet<LiveViewTableCapability> CAPABILITIES_FOR_FILTERED_TABLES
-
-
Method Detail
-
getName
String getName()
The name of the table.- Returns:
- The name of the table
-
getGroup
String getGroup()
A table can be assigned to a logical group.- Returns:
- the logical group name or an empty string if the group was not set
-
getShortDescription
String getShortDescription()
A short description of the table- Returns:
- the short description or an empty string if no description was configured
-
getDescription
String getDescription()
A description of the table- Returns:
- the description or an empty string if no description was configured
-
getSemanticInterpretationMap
Map<String,List<SemanticInterpretation>> getSemanticInterpretationMap()
A map of semantic interpretation, where the key is the field name, and the value is a list of semantic interpretation for that field. If a field does not have an interpretation, the field will not be in the result.- Returns:
- a map of field names and the semantic interpretation
-
getFields
List<Schema.Field> getFields()
Returns the fields describing the table columns.- Returns:
- The fields describing the table columns, not including internal fields
-
getFields
List<Schema.Field> getFields(boolean includeInternal)
Returns the fields describing the table columns.- Parameters:
includeInternal
- specifies whether to include system internal fields in the list- Returns:
- The fields describing the table columns
-
getKeyFields
List<Schema.Field> getKeyFields()
Returns the schema which describes the key for the records in this table. This is the schema that will describe the key values that are avaiilable from the Events which are handed to a QueryListener.- Returns:
- the schema which describes the key for the records in this table
- Since:
- LiveView 1.6
-
getQueryLanguages
EnumSet<LiveViewQueryLanguage> getQueryLanguages()
Returns the languages that can be used for queries against this table.- Returns:
- all languages that are supported
- Since:
- 1.4
- See Also:
LiveViewQueryLanguage
-
getTableCapabilities
EnumSet<LiveViewTableCapability> getTableCapabilities()
Returns the capabilities that this Table supports.- Returns:
- EnumSet that represents the (boolean) capabilities that this Table supports
- Since:
- 1.4
- See Also:
LiveViewTableCapability
-
getTablePublisher
TablePublisher getTablePublisher(String publisherName)
Retrieve a publisher instance allowing a client to publish data to this table with the default buffer sizeTablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT
and flush intervalTablePublisher.PUBLISH_INTERVAL_DEFAULT
.- Parameters:
publisherName
- assigns a name to the publisher. Data published will include the publisher name for tracking and recoverability purposes.- Returns:
- a publisher implementation
-
getTablePublisher
TablePublisher getTablePublisher(String publisherName, PublisherListener pubListener, PubListenerConfig pubListenerConfig) throws LiveViewException
Retrieve aTablePublisher
instance allowing a client to publish data to this table with the default buffer sizeTablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT
and flush intervalTablePublisher.PUBLISH_INTERVAL_DEFAULT
.- Parameters:
publisherName
- assigns a name to the publisher. Data published will include the publisher name for tracking and recoverability purposes.pubListener
- ThePublisherListener
on which the acknowledgement for the published tuples should be received.- Returns:
- a
TablePublisher
implementation. - Throws:
LiveViewException
- Since:
- 10.5.0
-
getTablePublisher
TablePublisher getTablePublisher(String publisherName, int bufferSize, long flushInterval, TimeUnit flushIntervalTimeUnit)
Retrieve aTablePublisher
instance allowing the client to publish data to the table.- Parameters:
publisherName
- assigns a name to the publisher. Data published will include the publisher name for tracking and recoverability purposes.bufferSize
- number of tuples to buffer client side before sending to server. A higher number produces better throughput but higher latency. Ignored for LowLatencyPublisherflushInterval
- The interval between flushing the buffered tuples if the buffer does not completely fill. If a flushInterval of less than or equal to zero specified, a low latency TablePublisher implementation will be used to sends data to the server on the client's thread. Note the LowLatencyPublisher ignores bufferSize.flushIntervalTimeUnit
- The time unit of the flush interval- Returns:
- a
TablePublisher
implementation.
-
getTablePublisher
TablePublisher getTablePublisher(String publisherName, int bufferSize, long flushInterval, TimeUnit flushIntervalUnit, PublisherListener pubListener, PubListenerConfig pubListenerConfig) throws LiveViewException
Retrieve aTablePublisher
publisher instance allowing the client to publish data to the table.- Parameters:
publisherName
- assigns a name to the publisher. Data published will include the publisher name for tracking and recoverability purposes.bufferSize
- number of tuples to buffer client side before sending to server. A higher number produces better throughput but higher latency. Ignored for LowLatencyPublisherflushInterval
- The interval between flushing the buffered tuples if the buffer does not completely fill. If a flushInterval of less than or equal to zero specified, a low latency TablePublisher implementation will be used to sends data to the server on the client's thread. Note the LowLatencyPublisher ignores bufferSize.flushIntervalTimeUnit
- The time unit of the flush interval.pubListener
- ThePublisherListener
on which the acknowledgement for the published tuples should be received.- Returns:
- a
TablePublisher
implementation. - Throws:
LiveViewException
- Since:
- 10.5.0
-
isEnabled
boolean isEnabled()
Sometimes Tables will be disabled, because the Container that they are in has been shut down. If you have a TableListListener active, then you will get a handleTableDisabled / handleTableModified call when the Table is shut down and started back up, respectively.- Returns:
- whether or not this Table is currently considered to be disabled.
-
getTableStatus
Table.TableStatus getTableStatus()
Get the status of the table. For new Tables created withTableAdminManager
this tells you where it is in the loading process.- Returns:
Table.TableStatus
-
getUnmetClientCapabilities
Collection<String> getUnmetClientCapabilities()
Every table might have requiredClientCapabilities which may not be supported by the current client. This method returns such unmet client capabilities.- Returns:
- the collection of
String
representing the capabilities that are not met by the client.
-
getIndices
List<List<String>> getIndices()
Returns all the indices for the table. Each index is a list of field names, because it might be indexed on more than one field. This will always have at least one value if you're talking to a server that provides this information. The first value will be the primary key for the table.- Returns:
- A list of the indices for this table, where each index is a list of field names. Null if server version is less than 2.0.1.
- Since:
- 2.0.1
-
getTableSpaceRef
String getTableSpaceRef()
Returns the table space reference for the given table.- Returns:
- It gets the name space to which the table belongs.
- Since:
- 2.0.1
-
getKeyFieldsCsv
String getKeyFieldsCsv()
Returns the key fields table in the form of CSV.- Returns:
- It gets the CSV string representation for key fields.
- Since:
- 2.0.1
-
getTableStatusMessage
String getTableStatusMessage()
Returns the table status message.- Returns:
- It gets the table status message.
- Since:
- 2.0.1
-
isSystemTable
boolean isSystemTable()
Returns true if the table is a system table.- Returns:
- It returns true if the table is a system table.
- Since:
- 2.0.1
-
getCreateTime
Timestamp getCreateTime()
Returns the time when the table was created- Returns:
- It returns the time stamp when the table was created.
- Since:
- 2.0.1
-
getFilter
String getFilter()
Returns the filter on the base table- Returns:
- It returns the filter if the table is a filtered table.
- Since:
- 2.1.1
-
-