Class InMemorySenderKeyStore
- java.lang.Object
-
- org.signal.libsignal.protocol.groups.state.InMemorySenderKeyStore
-
- All Implemented Interfaces:
SenderKeyStore
public class InMemorySenderKeyStore extends java.lang.Object implements SenderKeyStore
-
-
Constructor Summary
Constructors Constructor Description InMemorySenderKeyStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SenderKeyRecordloadSenderKey(SignalProtocolAddress sender, java.util.UUID distributionId)Returns a copy of theSenderKeyRecordcorresponding to the (distributionId + senderName + deviceId) tuple, or `null` if one does not exist.voidstoreSenderKey(SignalProtocolAddress sender, java.util.UUID distributionId, SenderKeyRecord record)Commit to storage theSenderKeyRecordfor a given (distributionId + senderName + deviceId) tuple.
-
-
-
Method Detail
-
storeSenderKey
public void storeSenderKey(SignalProtocolAddress sender, java.util.UUID distributionId, SenderKeyRecord record)
Description copied from interface:SenderKeyStoreCommit to storage theSenderKeyRecordfor a given (distributionId + senderName + deviceId) tuple.- Specified by:
storeSenderKeyin interfaceSenderKeyStore- Parameters:
sender- The address of the current client.distributionId- An opaque identifier that uniquely identifies the group (but isn't the group ID).record- the current SenderKeyRecord for the specified (distributionId + senderName + deviceId) tuple.
-
loadSenderKey
public SenderKeyRecord loadSenderKey(SignalProtocolAddress sender, java.util.UUID distributionId)
Description copied from interface:SenderKeyStoreReturns a copy of theSenderKeyRecordcorresponding to the (distributionId + senderName + deviceId) tuple, or `null` if one does not exist. It is important that implementations return a copy of the current durable information. The returned SenderKeyRecord may be modified, but those changes should not have an effect on the durable session state (what is returned by subsequent calls to this method) without the store method being called here first.- Specified by:
loadSenderKeyin interfaceSenderKeyStore- Parameters:
sender- The address of the current client.distributionId- An opaque identifier that uniquely identifies the group (but isn't the group ID).- Returns:
- a copy of the SenderKeyRecord corresponding to the (id + senderName + deviceId tuple, or `null` if one does not currently exist.
-
-