Package com.luciad.fusion.tilestore
Class ALfnTileStore.WriteResult
java.lang.Object
com.luciad.fusion.tilestore.ALfnTileStore.Result
com.luciad.fusion.tilestore.ALfnTileStore.WriteResult
- Enclosing class:
ALfnTileStore
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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.fusion.tilestore.ALfnTileStore.Result
ALfnTileStore.Result.Code
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ALfnTileStore.WriteResult
Indicates that new content was created, without any transactional information.static final ALfnTileStore.WriteResult
Indicates that previously existing content was deleted, without any transactional information.static final ALfnTileStore.WriteResult
Indicates that no content was found.static final ALfnTileStore.WriteResult
Indicates that previously existing content was overwritten, without any transactional information. -
Constructor Summary
ConstructorDescriptionWriteResult
(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.WriteResult
(ALfnTileStore.Result.Code aCode, long aTransactionManagementId, long aSequentialTransactionId, long aHighestCommittedTransactionId, long aContentLength) Constructs a new instance of this class with given parameters. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the content length in bytes of this transaction,-1
if unknown.long
Gets the highest committed transaction ID,-1
if unknown.long
Gets the sequential transaction ID,-1
if unknown.long
Gets the transaction management ID,-1
if unknown.toString()
Returns a string representation of this result's code.Methods inherited from class com.luciad.fusion.tilestore.ALfnTileStore.Result
getCode
-
Field Details
-
NOT_FOUND
Indicates that no content was found. This only applies to a "delete" operation. -
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
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
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 codeaTransactionManagementId
- the transaction management IDaSequentialTransactionId
- the sequential transaction IDaHighestCommittedTransactionId
- 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 codeaTransactionManagementId
- the transaction management IDaSequentialTransactionId
- the sequential transaction IDaHighestCommittedTransactionId
- the highest committed transaction IDaContentLength
- 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
Description copied from class:ALfnTileStore.Result
Returns a string representation of this result's code.- Overrides:
toString
in classALfnTileStore.Result
- Returns:
- a string representation of this result's code
-