public static final class ALfnTileStore.WriteResult extends ALfnTileStore.Result
ALfnTileStore.Result.Code
Modifier and Type | Field and Description |
---|---|
static ALfnTileStore.WriteResult |
CREATED
Indicates that new content was created, without any transactional information.
|
static ALfnTileStore.WriteResult |
DELETED
Indicates that previously existing content was deleted, without any transactional information.
|
static ALfnTileStore.WriteResult |
NOT_FOUND
Indicates that no content was found.
|
static ALfnTileStore.WriteResult |
PUT
Indicates that previously existing content was overwritten, without any transactional information.
|
Constructor and Description |
---|
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.
|
WriteResult(ALfnTileStore.Result.Code aCode,
long aTransactionManagementId,
long aSequentialTransactionId,
long aHighestCommittedTransactionId,
long aContentLength)
Constructs a new instance of this class with given parameters.
|
Modifier and Type | Method and Description |
---|---|
long |
getContentLength()
Gets the content length in bytes of this transaction,
-1 if unknown. |
long |
getHighestCommittedTransactionId()
Gets the highest committed transaction ID,
-1 if unknown. |
long |
getSequentialTransactionId()
Gets the sequential transaction ID,
-1 if unknown. |
long |
getTransactionManagementId()
Gets the transaction management ID,
-1 if unknown. |
String |
toString()
Returns a string representation of this result's code.
|
getCode
public static final ALfnTileStore.WriteResult NOT_FOUND
public static final ALfnTileStore.WriteResult CREATED
-1
.
This only applies to a "put" operation.
If you need to pass transactional information, use the constructor to create a new object.
public static final ALfnTileStore.WriteResult PUT
-1
.
This only applies to a "put" operation.
If you need to pass transactional information, use the constructor to create a new object.
public static final ALfnTileStore.WriteResult DELETED
-1
.
This only applies to a "delete" operation.
If you need to pass transactional information, use the constructor to create a new object.
public WriteResult(ALfnTileStore.Result.Code aCode, long aTransactionManagementId, long aSequentialTransactionId, long aHighestCommittedTransactionId)
aCode
- a result code corresponding to an HTTP response codeaTransactionManagementId
- the transaction management IDaSequentialTransactionId
- the sequential transaction IDaHighestCommittedTransactionId
- the highest committed transaction IDpublic WriteResult(ALfnTileStore.Result.Code aCode, long aTransactionManagementId, long aSequentialTransactionId, long aHighestCommittedTransactionId, long aContentLength)
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 lengthpublic long getTransactionManagementId()
-1
if unknown.-1
if unknownpublic long getSequentialTransactionId()
-1
if unknown.
It is incremented by 1 for every transaction.-1
if unknownpublic long getHighestCommittedTransactionId()
-1
if unknown.
All transactions up to an including this number are guaranteed to have been committed.-1
if unknownpublic long getContentLength()
-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.-1
if unknownpublic String toString()
ALfnTileStore.Result
toString
in class ALfnTileStore.Result