
public class DataManagerChordSessionBean extends Object implements DataManagerChordSessionBeanLocal
| Modifier and Type | Field and Description |
|---|---|
private javax.ejb.SessionContext |
context |
private FingerSessionBeanLocal |
fingerSessionBean
CONFIG VARS END
|
private static int |
PERIOD
CONFIG VARS
|
| Constructor and Description |
|---|
DataManagerChordSessionBean() |
| Modifier and Type | Method and Description |
|---|---|
NodeReference |
findSuccessor(Key key)
implementation of the findSuccessor Chord primitive using the FingerTable
and a RemoteNodeProxy (the DataManager is just a client, not in the ring, as Chord protocol permits)
|
private void |
fixFingers()
Fix fingers Chord primitive implementation
|
private RemoteNodeProxy |
getReference(NodeReference nodeReference)
Get an instance of a RemoteNodeProxy for the NodeReference given
|
private void |
init() |
List<GenericValue> |
lookup(Key key)
Make a lookup on the Chord Network for the value associated with the given Key
|
void |
timeout(javax.ejb.Timer timer) |
Boolean |
update(Key key,
GenericValue elem) |
Boolean |
update(Key key,
List<GenericValue> elems)
Make a delete and put in the chord network
(just for simplicity not in a single call to the proxy)
for a List of elems
|
Boolean |
write(Key key,
GenericValue elem)
Make a put in the Chord Network for the given elem
|
Boolean |
write(Key key,
List<GenericValue> elems)
Make a put in the Chord Network for a full value (a List) associated with the Key
|
private static final int PERIOD
private FingerSessionBeanLocal fingerSessionBean
private javax.ejb.SessionContext context
@PostConstruct private void init()
public void timeout(javax.ejb.Timer timer)
public List<GenericValue> lookup(Key key)
lookup in interface DataManagerChordSessionBeanLocalkey - |public Boolean write(Key key, GenericValue elem)
write in interface DataManagerChordSessionBeanLocalkey - |elem - |public Boolean write(Key key, List<GenericValue> elems)
write in interface DataManagerChordSessionBeanLocalkey - |elems - |public Boolean update(Key key, List<GenericValue> elems)
update in interface DataManagerChordSessionBeanLocalkey - |elems - |public Boolean update(Key key, GenericValue elem)
update in interface DataManagerChordSessionBeanLocalpublic NodeReference findSuccessor(Key key)
key - |private RemoteNodeProxy getReference(NodeReference nodeReference)
nodeReference - |private void fixFingers()
Copyright © 2018. All rights reserved.