|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sdnplatform.sync.internal.StoreRegistry
public class StoreRegistry
Manage registered stores and associated metadata
| Nested Class Summary | |
|---|---|
static class |
StoreRegistry.Hint
A hint representing a hint key and a value |
static class |
StoreRegistry.HintKey
A key in the hint store |
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
StoreRegistry(SyncManager syncManager,
java.lang.String dbPath)
Construct a new StoreRegistry |
|
| Method Summary | |
|---|---|
SynchronizingStorageEngine |
get(java.lang.String storeName)
Get the store associated with the given name, or null if there is no such store |
void |
queueHint(java.lang.String storeName,
ByteArray key,
Versioned<byte[]> value)
Add a key/value to the hint store for the given store |
SynchronizingStorageEngine |
register(java.lang.String storeName,
ISyncService.Scope scope,
boolean persistent)
Register a new store with the given name, scope and persistence |
void |
shutdown()
|
void |
takeHints(java.util.Collection<StoreRegistry.Hint> c,
int maxElements)
Drain up to the given number of hints to the provided collection. |
java.util.Collection<SynchronizingStorageEngine> |
values()
Get a collection containing all the currently-registered stores |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.slf4j.Logger logger
| Constructor Detail |
|---|
public StoreRegistry(SyncManager syncManager,
java.lang.String dbPath)
StoreRegistry
syncManager - The associated syncManager| Method Detail |
|---|
public SynchronizingStorageEngine get(java.lang.String storeName)
storeName -
SynchronizingStorageEngine
public SynchronizingStorageEngine register(java.lang.String storeName,
ISyncService.Scope scope,
boolean persistent)
throws PersistException
storeName - the name of the storescope - the scope for the storepersistent - whether the store should be persistent
PersistExceptionpublic java.util.Collection<SynchronizingStorageEngine> values()
Collection
public void queueHint(java.lang.String storeName,
ByteArray key,
Versioned<byte[]> value)
storeName - the name of the store for the keyed valuekey - the keyvalue - the value
public void takeHints(java.util.Collection<StoreRegistry.Hint> c,
int maxElements)
throws java.lang.InterruptedException
c - the collection to which the hints should be copiedmaxElements - the maximum number of hints to drain
java.lang.InterruptedExceptionpublic void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||