com.h3c.util.persistence.cassandra.snapshotmgr

## Interface DBSnapshotMgr

-     public interface DBSnapshotMgr

  This interface specify the Persistence subject(Observable element) for backup listeners using the observer/listener design pattern. The registered backup services get notified when the persistence framework flush out all the current active transactions.So that backup process can init their DB backup.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DBstatus` | `getDatabaseStatus()` Get the active status of Database.
    `void` | `registerBackupService(DBBackUpListener obj)` Method to register the backup listener obj in persistence subject.
    `void` | `unregisterBackupService(DBBackUpListener obj)` Method to unregister the specific backup listener in persistence subject.

- - ### Method Detail

    - #### registerBackupService

          void registerBackupService(DBBackUpListener obj)
                                     throws CassandraSnapShotException

      Method to register the backup listener obj in persistence subject. The DB backup starts with this intimation so that database blocks new DB writes/reads, drain out all the current active transactions and ready for backup.Then the registered listeners will be notified to start the backup.
      Parameters:
        `obj` - The backup listener object to be registered.
      Throws:
        `CassandraSnapShotException` - Throws in case registration fails.

    - #### unregisterBackupService

          void unregisterBackupService(DBBackUpListener obj)
                                       throws CassandraSnapShotException

      Method to unregister the specific backup listener in persistence subject. This informs the persistence layer that the backup operations completes and DB operations can continue as normal.
      Parameters:
        `obj` - The registered backup listener to unregister
      Throws:
        `CassandraSnapShotException` - Throws if unregister fails.

    - #### getDatabaseStatus

          DBstatus getDatabaseStatus()

      Get the active status of Database. `DBstatus` gives current status of persistence service. Backup service uses this information to calculate the delay in start the backup.
      Returns:
        Current status of persistence storage.

Copyright © 2014. All Rights Reserved.