Class ALfnTileStore.WriteResult

java.lang.Object
com.luciad.fusion.tilestore.ALfnTileStore.Result
com.luciad.fusion.tilestore.ALfnTileStore.WriteResult
Enclosing class:
ALfnTileStore

public static final class ALfnTileStore.WriteResult extends ALfnTileStore.Result
The final result of a write operation ("put", "delete"). It contains all information necessary to uniquely identify the transaction corresponding to the write operation. A transaction consists of:
  • The transaction management ID, which is different upon every restart of the Tile Store.
  • For a given transaction management ID, the sequential transaction ID is a unique number identifying the transaction. It is guaranteed to be sequential, meaning that it is incremented by 1 for every subsequent transaction. Note that the same transaction ID may be used for a different transaction by another transaction management ID. It is only the combination of transaction management ID and transaction ID which is guaranteed to be unique.
  • The highest committed transaction ID (for the transaction management ID). All transactions up to this number are guaranteed to have been committed ("synced" to disk).
Since:
2013.1
  • Field Details

    • NOT_FOUND

      public static final ALfnTileStore.WriteResult NOT_FOUND
      Indicates that no content was found. This only applies to a "delete" operation.
    • CREATED

      public static final ALfnTileStore.WriteResult CREATED
      Indicates that new content was created, without any transactional information. This constant is convenient for when transactions are irrelevant. All transaction properties are set to -1. This only applies to a "put" operation.

      If you need to pass transactional information, use the constructor to create a new object.

      Since:
      2015.0
    • PUT

      public static final ALfnTileStore.WriteResult PUT
      Indicates that previously existing content was overwritten, without any transactional information. This constant is convenient for when transactions are irrelevant. All transaction properties are set to -1. This only applies to a "put" operation.

      If you need to pass transactional information, use the constructor to create a new object.

      Since:
      2015.0
    • DELETED

      public static final ALfnTileStore.WriteResult DELETED
      Indicates that previously existing content was deleted, without any transactional information. This constant is convenient for when transactions are irrelevant. All transaction properties are set to -1. This only applies to a "delete" operation.

      If you need to pass transactional information, use the constructor to create a new object.

      Since:
      2015.0
  • Constructor Details

    • WriteResult

      public WriteResult(ALfnTileStore.Result.Code aCode, long aTransactionManagementId, long aSequentialTransactionId, long aHighestCommittedTransactionId)
      Constructs a new instance of this class with given transactional parameters and unknown content length.
      Parameters:
      aCode - a result code corresponding to an HTTP response code
      aTransactionManagementId - the transaction management ID
      aSequentialTransactionId - the sequential transaction ID
      aHighestCommittedTransactionId - the highest committed transaction ID
    • WriteResult

      public WriteResult(ALfnTileStore.Result.Code aCode, long aTransactionManagementId, long aSequentialTransactionId, long aHighestCommittedTransactionId, long aContentLength)
      Constructs a new instance of this class with given parameters.
      Parameters:
      aCode - a result code corresponding to an HTTP response code
      aTransactionManagementId - the transaction management ID
      aSequentialTransactionId - the sequential transaction ID
      aHighestCommittedTransactionId - the highest committed transaction ID
      aContentLength - the content length
      Since:
      2015.0
  • Method Details

    • getTransactionManagementId

      public long getTransactionManagementId()
      Gets the transaction management ID, -1 if unknown.
      Returns:
      the transaction management ID, -1 if unknown
    • getSequentialTransactionId

      public long getSequentialTransactionId()
      Gets the sequential transaction ID, -1 if unknown. It is incremented by 1 for every transaction.
      Returns:
      the sequential transaction ID, -1 if unknown
    • getHighestCommittedTransactionId

      public long getHighestCommittedTransactionId()
      Gets the highest committed transaction ID, -1 if unknown. All transactions up to an including this number are guaranteed to have been committed.
      Returns:
      the highest committed transaction ID, -1 if unknown
    • getContentLength

      public long getContentLength()
      Gets the content length in bytes of this transaction, -1 if unknown. For 'put' operations, it is the number of bytes written. For 'delete' operations, it is the number of bytes deleted. Beware that space of deleted bytes is not necessarily reclaimed, and even if it is reclaimed, it may or may not be reclaimed immediately.
      Returns:
      the content length, or -1 if unknown
    • toString

      public String toString()
      Description copied from class: ALfnTileStore.Result
      Returns a string representation of this result's code.
      Overrides:
      toString in class ALfnTileStore.Result
      Returns:
      a string representation of this result's code