public final class SessionOwnershipRecord extends Object implements com.opencloud.util.FastSerializable
A Session Owner Record represents data for a single session stored by the session ownership facility.
A Session Ownership Record is immutable.
A SessionOwnershipRecord.Builder is used to create a new Session Ownership Record.
Calling the static method newBuilder() will create a builder with fields initialised with empty data and a sequence number of 0.
Calling toBuilder() on an existing SessionOwnershipRecord instance will create a builder with fields initialised to match the original record but with the sequence number incremented by one.
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionOwnershipRecord.Builder
Builder of Session Ownership Records.
|
| Constructor and Description |
|---|
SessionOwnershipRecord(DataInput stream)
Constructor used for deserialising a Session Ownership Record from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Set<String> |
getAdditionalKeys()
Get the additional keys of this Session Ownership Record.
|
String |
getAttribute(String name)
Get the value of the Session Ownership Record attribute with the specified name.
|
Map<String,String> |
getAttributes()
Get a map of attribute name to attribute value for all attributes stored with this Session Ownership Record.
|
Set<String> |
getAttributesNames()
Get the set of names of the attributes stored with this Session Ownership Record.
|
Set<String> |
getOwnerUris()
Get the URIs for the owner of this Session Ownership Record.
|
String |
getPrimaryKey()
Get the primary key of this Session Ownership Record.
|
int |
getSequenceNumber()
Get the sequence number of this Session Ownership Record.
|
int |
hashCode() |
static SessionOwnershipRecord.Builder |
newBuilder()
Create a new Session Ownership Record builder with fields initialised with empty data and a sequence number of 0.
|
SessionOwnershipRecord.Builder |
toBuilder()
Create a new builder with values initialised to match this record, however with the sequence number incremented by one.
|
void |
toStream(DataOutput stream)
Serialise this Session Ownership Record to the specified data output stream.
|
String |
toString() |
public SessionOwnershipRecord(DataInput stream) throws IOException
Constructor used for deserialising a Session Ownership Record from a stream.
This method is provided only to fulfill the requirements FastSerializable contract and should not be used for general purpose.
A SessionOwnershipRecord.Builder should be used to create new Session Ownership Records.
IOExceptionpublic static SessionOwnershipRecord.Builder newBuilder()
Create a new Session Ownership Record builder with fields initialised with empty data and a sequence number of 0.
public void toStream(DataOutput stream) throws IOException
Serialise this Session Ownership Record to the specified data output stream.
toStream in interface com.opencloud.util.FastSerializableIOExceptionpublic String getPrimaryKey()
Get the primary key of this Session Ownership Record.
public Set<String> getAdditionalKeys()
Get the additional keys of this Session Ownership Record.
public int getSequenceNumber()
Get the sequence number of this Session Ownership Record.
public Set<String> getOwnerUris()
Get the URIs for the owner of this Session Ownership Record.
public String getAttribute(String name)
Get the value of the Session Ownership Record attribute with the specified name.
name - the attribute name.null if there is no such attribute.public Set<String> getAttributesNames()
Get the set of names of the attributes stored with this Session Ownership Record.
public Map<String,String> getAttributes()
Get a map of attribute name to attribute value for all attributes stored with this Session Ownership Record.
public SessionOwnershipRecord.Builder toBuilder()
Create a new builder with values initialised to match this record, however with the sequence number incremented by one.