public class InMemoryNamespaceStore extends Object implements NamespaceStore
NamespaceStore used in test cases.| Constructor and Description |
|---|
InMemoryNamespaceStore() |
| Modifier and Type | Method and Description |
|---|---|
NamespaceMeta |
create(NamespaceMeta metadata)
Creates a new namespace.
|
NamespaceMeta |
delete(Id.Namespace id)
Deletes a namespace from the namespace metadata store.
|
NamespaceMeta |
get(Id.Namespace id)
Retrieves a namespace from the namespace metadata store.
|
List<NamespaceMeta> |
list()
Lists all registered namespaces.
|
void |
update(NamespaceMeta metadata)
Updates the namespace meta.
|
@Nullable public NamespaceMeta create(NamespaceMeta metadata)
NamespaceStorecreate in interface NamespaceStoremetadata - NamespaceMeta representing the namespace metadataNamespaceMeta if a namespace with the specified name existed already, null if the
a namespace with the specified name did not exist, and was created successfully
These semantics of return type are borrowed from ConcurrentHashMap.putIfAbsent(K, V)public void update(NamespaceMeta metadata)
NamespaceStoreupdate in interface NamespaceStoremetadata - NamespaceMeta representing the namespace metadata@Nullable public NamespaceMeta get(Id.Namespace id)
NamespaceStoreget in interface NamespaceStoreid - Id.Namespace of the requested namespaceNamespaceMeta of the requested namespace@Nullable public NamespaceMeta delete(Id.Namespace id)
NamespaceStoredelete in interface NamespaceStoreid - Id.Namespace of the namespace to deleteNamespaceMeta of the namespace if it was found and deleted, null if the specified namespace did not
exist
These semantics of return type are borrowed from ConcurrentHashMap.remove(java.lang.Object)public List<NamespaceMeta> list()
NamespaceStorelist in interface NamespaceStoreCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.