Interface Table

All Known Implementing Classes:
AbstractTable

public interface Table
An instance of a LiveView table.
  • Field Details

  • 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

      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:
    • 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

      TablePublisher getTablePublisher(String publisherName)
      Retrieve a publisher instance allowing a client to publish data to this table with the default buffer size TablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT and flush interval TablePublisher.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 a TablePublisher instance allowing a client to publish data to this table with the default buffer size TablePublisher.PUBLISH_BUFFER_SIZE_DEFAULT and flush interval TablePublisher.PUBLISH_INTERVAL_DEFAULT.
      Parameters:
      publisherName - assigns a name to the publisher. Data published will include the publisher name for tracking and recoverability purposes.
      pubListener - The PublisherListener 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 a TablePublisher 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 LowLatencyPublisher
      flushInterval - 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 a TablePublisher 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 LowLatencyPublisher
      flushInterval - 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 - The PublisherListener 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 with TableAdminManager 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