Package com.streambase.liveview.client
Interface Table
- All Known Implementing Classes:
AbstractTable
public interface Table
An instance of a LiveView table.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
ENUM for table groups.static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final EnumSet<LiveViewTableCapability>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final EnumSet<LiveViewQueryLanguage>
static final String
static final String
static final String
static final String
static final String
static final EnumSet<LiveViewTableCapability>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final Schema.Field[]
static final String
static final String
static final String
A special group used to identify system tables in LiveView. -
Method Summary
Modifier and TypeMethodDescriptionReturns the time when the table was createdA description of the tableReturns the fields describing the table columns.getFields
(boolean includeInternal) Returns the fields describing the table columns.Returns the filter on the base tablegetGroup()
A table can be assigned to a logical group.Returns all the indices for the table.Returns the schema which describes the key for the records in this table.Returns the key fields table in the form of CSV.getName()
The name of the table.Returns the languages that can be used for queries against this table.A map of semantic interpretation, where the key is the field name, and the value is a list of semantic interpretation for that field.A short description of the tableReturns the capabilities that this Table supports.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
.getTablePublisher
(String publisherName, int bufferSize, long flushInterval, TimeUnit flushIntervalTimeUnit) Retrieve aTablePublisher
instance allowing the client to publish data to the table.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.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
.Returns the table space reference for the given table.Get the status of the table.Returns the table status message.Every table might have requiredClientCapabilities which may not be supported by the current client.boolean
Sometimes Tables will be disabled, because the Container that they are in has been shut down.boolean
Returns true if the table is a system table.
-
Field Details
-
LV_STATS_TABLE
- See Also:
-
LV_ALERTS_TABLE
- See Also:
-
TABLES_TABLE_NAME
A special group used to identify system tables in LiveView.- See Also:
-
NAME_FIELD
- See Also:
-
GROUP_FIELD
- See Also:
-
TABLE_SPACE_FIELD
- See Also:
-
DESCRIPTION_FIELD
- See Also:
-
SHORT_DESCRIPTION_FIELD
- See Also:
-
QUERY_LANGUAGES_FIELD
- See Also:
-
CAPABILITIES_FIELD
- See Also:
-
IS_ENABLED_FIELD
- See Also:
-
FIELDLIST_FIELD
- See Also:
-
TABLE_SCHEMA_FIELD
- See Also:
-
KEY_FIELDS_CSV
- See Also:
-
REQUIRED_CLIENT_CAPABILITIES
- See Also:
-
INDICES_FIELD
- See Also:
-
STATUS_FIELD
- See Also:
-
STATUS_MESSAGE_FIELD
- See Also:
-
IS_SYSTEM_TABLE
- See Also:
-
CREATE_TIME
- See Also:
-
FILTER
- See Also:
-
NUM_SERVERS
- See Also:
-
REJECTED_SERVERS
- See Also:
-
TABLE_SEMANTIC_INTERPRETATION
- See Also:
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELD_NAME_NAME
- See Also:
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_INTERPRETATION_NAME
- See Also:
-
TABLE_SEMANTIC_INTERPRETATION_ELEMENT_FIELDS
-
SM_DISCOVERD_AT_START
- See Also:
-
SM_REMOVING
- See Also:
-
SM_DEFINED
- See Also:
-
SM_LOADING
- See Also:
-
SM_TABLE_CONTAINER_MISSING
- See Also:
-
SM_DYANAMICALLY_ADDED
- See Also:
-
SM_FILTERED_TABLE_DISCOVERED_AT_START_TIME
- See Also:
-
SM_FILTERED_TABLE_ERROR_PREDICATE_VALIDATION
- See Also:
-
SM_FILTERED_TABLE_DYNAMICALLY_ADDED
- See Also:
-
SYS_TABLES_GROUP
- See Also:
-
CEP_TABLES_GROUP
- See Also:
-
LIVEVIEW_LANGUAGE_ONLY
-
REAL_LV_CAPABILITIES
-
CAPABILITIES_FOR_FILTERED_TABLES
-
-
Method Details
-
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
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:
-
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:
-
getTablePublisher
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
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
-