
public class LightSessionBean extends Object implements LightSessionBeanLocal
| Modifier and Type | Field and Description |
|---|---|
private javax.ejb.SessionContext |
context |
(package private) DataManagerChordSessionBeanLocal |
dataManagerChordSessionBean |
private LookupSessionBeanLocal |
lookupSessionBean |
private static int |
PERIOD
The period to update the tree height in the master node
|
static int |
TETA_SPLIT |
private static Key |
TREE_HEIGHT_KEY
We know the key of the MASTER NODE, just for simplicity we are using a Key that is just 1_16 less than
MASTER_NODE key
|
private int |
treeHeight
Initial tree height
|
| Constructor and Description |
|---|
LightSessionBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkTreeHeight(Label label)
Called to check, in run-time, the height of the tree using the length of
a Label
|
int |
getTreeHeight() |
void |
init() |
private DataManagerChordSessionBeanLocal |
lookupDataManagerChordSessionBeanLocal() |
private void |
setRemoteTreeHeight()
This is called periodically, it sets the treeHeight consistent between the DataManager and the distributed DB
|
void |
setTreeHeight(int treeHeight)
Updates the treeHeight with the given argument
|
Bucket |
splitAndPut(Bucket localBucket,
long timestamp,
GenericStat elem)
Split the distributed tree and migrates the datas in the new Bucket (s)
|
void |
timeout(javax.ejb.Timer timer) |
public static final int TETA_SPLIT
private LookupSessionBeanLocal lookupSessionBean
private static final int PERIOD
DataManagerChordSessionBeanLocal dataManagerChordSessionBean
private static final Key TREE_HEIGHT_KEY
private int treeHeight
private javax.ejb.SessionContext context
@PostConstruct public void init()
public void timeout(javax.ejb.Timer timer)
private void setRemoteTreeHeight()
public void checkTreeHeight(Label label)
checkTreeHeight in interface LightSessionBeanLocallabel - |public int getTreeHeight()
getTreeHeight in interface LightSessionBeanLocalpublic void setTreeHeight(int treeHeight)
setTreeHeight in interface LightSessionBeanLocaltreeHeight - |public Bucket splitAndPut(Bucket localBucket, long timestamp, GenericStat elem)
splitAndPut in interface LightSessionBeanLocallocalBucket - |timestamp - |elem - |private DataManagerChordSessionBeanLocal lookupDataManagerChordSessionBeanLocal()
Copyright © 2018. All rights reserved.