Class NonPersistentDataProvider
java.lang.Object
org.opendaylight.controller.cluster.NonPersistentDataProvider
- All Implemented Interfaces:
DataPersistenceProvider
A DataPersistenceProvider implementation with persistence disabled, essentially a no-op.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteMessages(long sequenceNumber) Deletes journal entries up to the given sequence number.voiddeleteSnapshots(SnapshotSelectionCriteria criteria) Deletes snapshots based on the given criteria.longReturns the last sequence number contained in the journal.booleanReceive and potentially handle aJournalProtocolresponse.booleanReceive and potentially handle aSnapshotProtocolresponse.booleanReturns whether or not persistence recovery is applicable/enabled.<T> voidPersists an entry to the applicable journal synchronously.<T> voidpersistAsync(T entry, Procedure<T> procedure) Persists an entry to the applicable journal asynchronously.voidsaveSnapshot(Object snapshot) Saves a snapshot.
-
Constructor Details
-
NonPersistentDataProvider
-
-
Method Details
-
isRecoveryApplicable
public boolean isRecoveryApplicable()Description copied from interface:DataPersistenceProviderReturns whether or not persistence recovery is applicable/enabled.- Specified by:
isRecoveryApplicablein interfaceDataPersistenceProvider- Returns:
- true if recovery is applicable, otherwise false, in which case the provider is not persistent and may not have anything to be recovered
-
persist
Description copied from interface:DataPersistenceProviderPersists an entry to the applicable journal synchronously.- Specified by:
persistin interfaceDataPersistenceProvider- Type Parameters:
T- the type of the journal entry- Parameters:
entry- the journal entry to persistprocedure- the callback when persistence is complete
-
persistAsync
Description copied from interface:DataPersistenceProviderPersists an entry to the applicable journal asynchronously.- Specified by:
persistAsyncin interfaceDataPersistenceProvider- Type Parameters:
T- the type of the journal entry- Parameters:
entry- the journal entry to persistprocedure- the callback when persistence is complete
-
saveSnapshot
Description copied from interface:DataPersistenceProviderSaves a snapshot.- Specified by:
saveSnapshotin interfaceDataPersistenceProvider- Parameters:
snapshot- the snapshot object to save
-
deleteSnapshots
Description copied from interface:DataPersistenceProviderDeletes snapshots based on the given criteria.- Specified by:
deleteSnapshotsin interfaceDataPersistenceProvider- Parameters:
criteria- the search criteria
-
deleteMessages
public void deleteMessages(long sequenceNumber) Description copied from interface:DataPersistenceProviderDeletes journal entries up to the given sequence number.- Specified by:
deleteMessagesin interfaceDataPersistenceProvider- Parameters:
sequenceNumber- the sequence number
-
getLastSequenceNumber
public long getLastSequenceNumber()Description copied from interface:DataPersistenceProviderReturns the last sequence number contained in the journal.- Specified by:
getLastSequenceNumberin interfaceDataPersistenceProvider- Returns:
- the last sequence number
-
handleJournalResponse
Description copied from interface:DataPersistenceProviderReceive and potentially handle aJournalProtocolresponse.- Specified by:
handleJournalResponsein interfaceDataPersistenceProvider- Parameters:
response- AJournalProtocolresponse- Returns:
trueif the response was handled
-
handleSnapshotResponse
Description copied from interface:DataPersistenceProviderReceive and potentially handle aSnapshotProtocolresponse.- Specified by:
handleSnapshotResponsein interfaceDataPersistenceProvider- Parameters:
response- ASnapshotProtocolresponse- Returns:
trueif the response was handled
-