Class InMemorySignedPreKeyStore
-
- All Implemented Interfaces:
-
org.signal.libsignal.protocol.state.SignedPreKeyStore
public class InMemorySignedPreKeyStore implements SignedPreKeyStore
-
-
Constructor Summary
Constructors Constructor Description InMemorySignedPreKeyStore()
-
Method Summary
Modifier and Type Method Description SignedPreKeyRecordloadSignedPreKey(int signedPreKeyId)Load a local SignedPreKeyRecord. List<SignedPreKeyRecord>loadSignedPreKeys()Load all local SignedPreKeyRecords. voidstoreSignedPreKey(int signedPreKeyId, SignedPreKeyRecord record)Store a local SignedPreKeyRecord. booleancontainsSignedPreKey(int signedPreKeyId)voidremoveSignedPreKey(int signedPreKeyId)Delete a SignedPreKeyRecord from local storage. -
-
Method Detail
-
loadSignedPreKey
SignedPreKeyRecord loadSignedPreKey(int signedPreKeyId)
Load a local SignedPreKeyRecord.
- Parameters:
signedPreKeyId- the ID of the local SignedPreKeyRecord.- Returns:
the corresponding SignedPreKeyRecord.
-
loadSignedPreKeys
List<SignedPreKeyRecord> loadSignedPreKeys()
Load all local SignedPreKeyRecords.
- Returns:
All stored SignedPreKeyRecords.
-
storeSignedPreKey
void storeSignedPreKey(int signedPreKeyId, SignedPreKeyRecord record)
Store a local SignedPreKeyRecord.
- Parameters:
signedPreKeyId- the ID of the SignedPreKeyRecord to store.record- the SignedPreKeyRecord.
-
containsSignedPreKey
boolean containsSignedPreKey(int signedPreKeyId)
- Parameters:
signedPreKeyId- A SignedPreKeyRecord ID.- Returns:
true if the store has a record for the signedPreKeyId, otherwise false.
-
removeSignedPreKey
void removeSignedPreKey(int signedPreKeyId)
Delete a SignedPreKeyRecord from local storage.
- Parameters:
signedPreKeyId- The ID of the SignedPreKeyRecord to remove.
-
-
-
-