public class UpgradableStore<L,N,R>
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
UpgradableStore.Handler<N,R>
A handler that 
 | 
static class  | 
UpgradableStore.Pair<A,B>
A simple pair class that holds a request and its associated response from one of the nodes. 
 | 
| Constructor and Description | 
|---|
UpgradableStore(UpgradableStore.Handler<N,R> handler)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addNode(L label, L parent, N node)  | 
void | 
addNode(L label, N node)  | 
N | 
getHandlingObject(L start, R request)  | 
boolean | 
handle(L start, R request)  | 
void | 
replaceNode(L label, N node)  | 
void | 
replaceTargetedNode(L label, N oldNode, N newNode)  | 
void | 
upgradeNode(L label, N node)  | 
public UpgradableStore(UpgradableStore.Handler<N,R> handler)
public boolean handle(L start, R request) throws java.lang.Exception
java.lang.Exceptionpublic N getHandlingObject(L start, R request) throws java.lang.Exception
java.lang.Exceptionpublic void addNode(L label, L parent, N node) throws ChainOfR.DuplicateIndexException, MetadataException
public void addNode(L label, N node) throws ChainOfR.DuplicateIndexException, MetadataException
public void upgradeNode(L label, N node) throws ChainOfR.IndexNotFoundException
ChainOfR.IndexNotFoundExceptionpublic void replaceNode(L label, N node) throws MetadataException
MetadataExceptionpublic void replaceTargetedNode(L label, N oldNode, N newNode) throws ChainOfR.IndexNotFoundException
ChainOfR.IndexNotFoundException