org.sdnplatform.sync.internal.store
Class SynchronizingStorageEngine

java.lang.Object
  extended by org.sdnplatform.sync.internal.store.ListenerStorageEngine
      extended by org.sdnplatform.sync.internal.store.SynchronizingStorageEngine
All Implemented Interfaces:
IStorageEngine<ByteArray,byte[]>, IStore<ByteArray,byte[]>

public class SynchronizingStorageEngine
extends ListenerStorageEngine

This storage engine will asynchronously replicate its data to the other nodes in the cluster based on the scope of the s


Field Summary
protected static org.slf4j.Logger logger
           
protected  ISyncService.Scope scope
          The scope of distribution for data in this store
protected  SyncManager syncManager
          The synchronization manager
 
Fields inherited from class org.sdnplatform.sync.internal.store.ListenerStorageEngine
debugCounter, listeners, localStorage
 
Constructor Summary
SynchronizingStorageEngine(IStorageEngine<ByteArray,byte[]> localStorage, SyncManager syncManager, IDebugCounterService debugCounter, ISyncService.Scope scope)
          Allocate a synchronizing storage engine
 
Method Summary
 ISyncService.Scope getScope()
          Get the scope for this store
 void put(ByteArray key, Versioned<byte[]> value)
          Associate the value with the key and version in this store
 
Methods inherited from class org.sdnplatform.sync.internal.store.ListenerStorageEngine
addListener, cleanupTask, close, entries, get, getName, getVersions, isPersistent, keys, notifyListeners, notifyListeners, setTombstoneInterval, truncate, updateCounter, writeSyncValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger

syncManager

protected SyncManager syncManager
The synchronization manager


scope

protected ISyncService.Scope scope
The scope of distribution for data in this store

Constructor Detail

SynchronizingStorageEngine

public SynchronizingStorageEngine(IStorageEngine<ByteArray,byte[]> localStorage,
                                  SyncManager syncManager,
                                  IDebugCounterService debugCounter,
                                  ISyncService.Scope scope)
Allocate a synchronizing storage engine

Parameters:
localStorage - the local storage
syncManager - the sync manager
debugCounter - the debug counter service
scope - the scope for this store
rpcService - the RPC service
storeName - the name of the store
Method Detail

put

public void put(ByteArray key,
                Versioned<byte[]> value)
         throws SyncException
Description copied from interface: IStore
Associate the value with the key and version in this store

Specified by:
put in interface IStore<ByteArray,byte[]>
Overrides:
put in class ListenerStorageEngine
Parameters:
key - The key to use
value - The value to store and its version.
Throws:
SyncException

getScope

public ISyncService.Scope getScope()
Get the scope for this store

Returns: