public interface SessionOwnershipActivity
The Session Ownership Activity is the activity type on which the Session Ownership resource adaptor fires session ownership operation result events.
Modifier and Type | Method and Description |
---|---|
long |
deleteRecord(String primaryKey,
Set<String> additionalKeys)
Asynchronously attempt to delete all the session ownership records identified by the specified primary key and additional keys.
|
long |
deleteRecordWithCASCompareSequence(int expectedStoredSequence,
String primaryKey,
Set<String> additionalKeys)
Asynchronously attempt to delete all the session ownership records identified by the specified primary key and additional keys.
|
void |
endActivity()
Request that this session ownership activity be ended.
|
boolean |
hasEnded()
Determine if a request has been made to end this session ownership activity.
|
boolean |
queryInProgress()
Determine if an asynchronous query operation is still in progress on this activity.
|
long |
retrieveRecord(String primaryKey)
Asynchronously attempt to retrieve the session ownership record with the specified primary key.
|
long |
retrieveRecordsByAdditionalKey(String additionalKey)
Asynchronously attempt to retrieve all session ownership records with the specified additional key.
|
long |
storeRecord(SessionOwnershipRecord sessionOwnershipRecord)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long |
storeRecord(SessionOwnershipRecord sessionOwnershipRecord,
long ttl)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long |
storeRecordWithCASCompareSequence(int expectedStoredSequence,
SessionOwnershipRecord sessionOwnershipRecord)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long |
storeRecordWithCASCompareSequence(int expectedStoredSequence,
SessionOwnershipRecord sessionOwnershipRecord,
long ttl)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long |
storeRecordWithCASCreateOnly(SessionOwnershipRecord sessionOwnershipRecord)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long |
storeRecordWithCASCreateOnly(SessionOwnershipRecord sessionOwnershipRecord,
long ttl)
Asynchronously attempt to write a session ownership record into the session ownership store.
|
long storeRecord(SessionOwnershipRecord sessionOwnershipRecord) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will blindly overwrite anything already stored against the specified record’s primary key and additional keys. If the write is successful, the TTL of the record will set with the default TTL of the session ownership store configured for the platform.
sessionOwnershipRecord
- the record to store.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long storeRecord(SessionOwnershipRecord sessionOwnershipRecord, long ttl) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will blindly overwrite anything already stored against the specified record’s primary key and additional keys. If the write is successful, the TTL of the record will set to the specified value.
sessionOwnershipRecord
- the record to store.ttl
- the duration, in milliseconds, for which the session ownership store should keep the new record.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long storeRecordWithCASCreateOnly(SessionOwnershipRecord sessionOwnershipRecord) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will only be successful if there is no record already stored with the same primary key as that of the specified record. If the write is successful, the TTL of the record will set with the default TTL of the session ownership store configured for the platform.
sessionOwnershipRecord
- the record to store.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long storeRecordWithCASCreateOnly(SessionOwnershipRecord sessionOwnershipRecord, long ttl) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will only be successful if there is no record already stored with the same primary key as that of the specified record. If the write is successful, the TTL of the record will set to the specified value.
sessionOwnershipRecord
- the record to store.ttl
- the duration, in milliseconds, for which the session ownership store should keep the new record.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long storeRecordWithCASCompareSequence(int expectedStoredSequence, SessionOwnershipRecord sessionOwnershipRecord) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will only be successful if there already exists a session ownership record with the same primary key as the specified record and that record has a sequence number matching the specified expected sequence number. If the write is successful, the TTL of the record will set with the default TTL of the session ownership store configured for the platform.
expectedStoredSequence
- the expected sequence number of the record currently stored that will be replaced.sessionOwnershipRecord
- the updated record to store.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long storeRecordWithCASCompareSequence(int expectedStoredSequence, SessionOwnershipRecord sessionOwnershipRecord, long ttl) throws NullPointerException
Asynchronously attempt to write a session ownership record into the session ownership store. The write will only be successful if there already exists a session ownership record with the same primary key as the specified record and that record has a sequence number matching the specified expected sequence number. If the write is successful, the TTL of the record will set to the specified value.
expectedStoredSequence
- the expected sequence number of the record currently stored that will be replaced.sessionOwnershipRecord
- the updated record to store.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if sessionOwnershipRecord
is null
.long deleteRecord(String primaryKey, Set<String> additionalKeys) throws NullPointerException
Asynchronously attempt to delete all the session ownership records identified by the specified primary key and additional keys. The caller must specify all additional keys, ie. the implementation will not do a lookup on primary key before deleting records. If an additional key is not provided, and a record with that key exists in the session ownership store, it will not be removed by this method.
primaryKey
- the primary key of the session ownership record to be removed.additionalKeys
- the additional keys to remove.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if either argument is null
.long deleteRecordWithCASCompareSequence(int expectedStoredSequence, String primaryKey, Set<String> additionalKeys) throws NullPointerException
Asynchronously attempt to delete all the session ownership records identified by the specified primary key and additional keys. The delete will only occur if there already exists a session ownership record with the same primary key as the specified record and that record has a sequence number matching the specified expected sequence number. The caller must specify all additional keys, ie. the implementation will not do a lookup on primary key before deleting records. If an additional key is not provided, and a record with that key exists in the session ownership store, it will not be removed by this method.
expectedStoredSequence
- the expected sequence number of the record currently stored to be removed.primaryKey
- the primary key of the session ownership record to be removed.additionalKeys
- the additional keys to remove.SessionOwnershipWriteResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if primaryKey
or additionalKeys
is null
.long retrieveRecord(String primaryKey) throws NullPointerException
Asynchronously attempt to retrieve the session ownership record with the specified primary key.
primaryKey
- the primary key of the session ownership record to retrieve.SessionOwnershipReadResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if primaryKey
is null
.long retrieveRecordsByAdditionalKey(String additionalKey) throws NullPointerException
Asynchronously attempt to retrieve all session ownership records with the specified additional key.
additionalKey
- the additional key of the session ownership records to retrieve.SessionOwnershipReadResultEvent
fired on this activity so that the SBB can match the result event to the query it relates to.NullPointerException
- if additionalKey
is null
.boolean queryInProgress()
Determine if an asynchronous query operation is still in progress on this activity. The query operations are the store, delete, and retrieve operations defined in this interface.
true
if a query operation is still in progress, false
otherwise.void endActivity()
Request that this session ownership activity be ended.
boolean hasEnded()
Determine if a request has been made to end this session ownership activity.
true
if the activity has been ended