X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2FDataPersistenceProvider.java;h=d136d45bc7aa6bbfb4ea9d0092f24a4e849c10fe;hp=730310e22e2f37d5153c2c918ea5b458b3531fe2;hb=4e696d9795fe7eef40369c05c340d137394126f3;hpb=5679203b147817962534344db273e4f2109fd949 diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/DataPersistenceProvider.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/DataPersistenceProvider.java index 730310e22e..d136d45bc7 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/DataPersistenceProvider.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/DataPersistenceProvider.java @@ -16,44 +16,49 @@ import akka.persistence.SnapshotSelectionCriteria; * API. */ public interface DataPersistenceProvider { + /** - * @return false if recovery is not applicable. In that case the provider is not persistent and may not have - * anything to be recovered + * Returns whether or not persistence recovery is applicable/enabled. + * + * @return true if recovery is applicable, otherwise false, in which case the provider is not persistent and may + * not have anything to be recovered */ boolean isRecoveryApplicable(); /** - * Persist a journal entry. + * Persists an entry to he applicable synchronously. * - * @param o - * @param procedure - * @param + * @param entry the journal entry to persist + * @param procedure the callback when persistence is complete + * @param the type of the journal entry */ - void persist(T o, Procedure procedure); + void persist(T entry, Procedure procedure); /** - * Save a snapshot + * Saves a snapshot. * - * @param o + * @param snapshot the snapshot object to save */ - void saveSnapshot(Object o); + void saveSnapshot(Object snapshot); /** - * Delete snapshots based on the criteria + * Deletes snapshots based on the given criteria. * - * @param criteria + * @param criteria the search criteria */ void deleteSnapshots(SnapshotSelectionCriteria criteria); /** - * Delete journal entries up to the sequence number + * Deletes journal entries up to the given sequence number. * - * @param sequenceNumber + * @param sequenceNumber the sequence number */ void deleteMessages(long sequenceNumber); /** * Returns the last sequence number contained in the journal. + * + * @return the last sequence number */ long getLastSequenceNumber(); }