public abstract class CacheResponse<K,V>
extends java.lang.Object
CacheResponse
provides details regarding the status of a caching request.Constructor and Description |
---|
CacheResponse()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract K |
getKey()
Returns the key for the request or null if no key is used.
|
abstract LockToken |
getLockToken()
If the caching request successfully completed and performed a locking operation then a lock token will be returned.
|
abstract RequestStatus |
getStatus()
Returns the status of a caching request.
|
abstract V |
getValue()
Returns the value for the request or null if no value is available.
|
abstract VersionToken |
getVersionToken()
If the caching request successfully completed a key/value operation and the object has a version then a version token
will be returned.
|
public abstract RequestStatus getStatus()
public abstract K getKey()
public abstract V getValue()
Returns the value for the request or null if no value is available.
Examples:
If a read request returns RequestStatus.ObjectNotFound
then getValue will return null.
An add request, regardless of RequestStatus
will return the supplied value.
public abstract LockToken getLockToken()
If the caching request successfully completed and performed a locking operation then a lock token will be returned.
Note, to check the validity of a lock token, check LockToken.hasValue()
.
public abstract VersionToken getVersionToken()
If the caching request successfully completed a key/value operation and the object has a version then a version token will be returned.
Note, to check the validity of a version token, execute VersionToken.hasValue()
.