public class StorageSystem
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> |
locationTable |
HashtableServer |
myHashTableServer |
int |
myId |
java.lang.String |
myURL |
boolean |
recordStats |
java.util.Vector<java.lang.String> |
relocating |
java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.String> |
serverLocationMapping |
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Integer> |
serverMapping |
java.util.concurrent.ConcurrentHashMap<java.lang.Integer,HashtableServer> |
servers |
boolean |
startCompute |
boolean |
writeThroughCache |
| Constructor and Description |
|---|
StorageSystem(java.util.Vector<java.lang.String> hostList)
Constructor without reference to local hashtable server object, backwards compatible
|
StorageSystem(java.util.Vector<java.lang.String> hostList,
HashtableServer paramHashtableServer)
Constructor with reference to local hashtable server object
|
StorageSystem(java.util.Vector<java.lang.String> hostList,
HashtableServer paramHashtableServer,
boolean writeThrough)
Constructor for caching case
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearStatContainers() |
void |
enableStats()
Turn on stat recording
|
NodeData |
exec(NodeData n) |
java.util.Vector<NodeData> |
execParallel(java.util.Vector<NodeData> paramVector) |
HashtableServer |
findServer(int nodeId) |
java.util.Vector<java.lang.String> |
getAllKeys(java.lang.String url) |
java.util.Vector<Node> |
getAllNodes() |
ClusterMeasures |
getClusterMeasures(java.lang.String url) |
java.util.Vector<Node> |
getLocalNodes(java.util.Vector<java.lang.String> paramVector) |
java.util.Vector<Node> |
getLocalNodes(java.util.Vector<java.lang.String> paramVector,
boolean withCaching) |
java.lang.String |
getLocation(java.lang.String nodeId) |
java.lang.String |
getLocationURL(java.lang.String nodeId) |
Node |
getNode(java.lang.String paramString)
get node from local or remote and return to application
|
Node |
getNode(java.lang.String paramString,
boolean withCaching)
similar to getNode, with an additional application level directive to control caching
|
NodeData |
getNodeProperties(NodeData n)
Reflection API of the storage system to get properties for a given nodeId
|
java.util.Vector<NodeData> |
getNodePropertiesParallel(java.util.Vector<NodeData> paramVector)
Bulk reflection API of the storage system to get the properties for the given nodeIds
|
java.util.Vector<Node> |
getNodesParallel(java.util.Vector<java.lang.String> paramVector)
bulk call for getNode
|
java.util.Vector<Node> |
getNodesParallel(java.util.Vector<java.lang.String> paramVector,
boolean withCaching)
bulk call for getNode, with an additional application level directive to control caching
|
int |
getNumberOfServers()
get the number of servers in the cluster
|
int |
getServerID(int nodeID) |
java.lang.String |
getStats() |
java.lang.String |
getStats(boolean includeHashtable)
External API to get stats
|
void |
putNode(java.lang.String paramString,
Node paramNode)
put node, called from the application to put a node in the local or remote server
|
void |
putNodesParallel(java.util.Vector<Node> nodeList)
Bulk call to putNode, called by the application
Calls are bucketised to the respective servers
|
boolean |
relocate(java.lang.String nodeId) |
boolean |
relocate(java.lang.String nodeId,
boolean lock) |
void |
updateNodeProperties(NodeData n)
update Reflection API for the storage system
|
void |
updateNodePropertiesParallel(java.util.Vector<NodeData> nodeList)
updateNodeProperties for the bulk case
|
public java.util.concurrent.ConcurrentHashMap<java.lang.Integer,HashtableServer> servers
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.Integer> serverMapping
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> locationTable
public java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.lang.String> serverLocationMapping
public java.util.Vector<java.lang.String> relocating
public java.lang.String myURL
public int myId
public HashtableServer myHashTableServer
public boolean recordStats
public boolean writeThroughCache
public boolean startCompute
public StorageSystem(java.util.Vector<java.lang.String> hostList)
throws java.rmi.RemoteException
hostList - java.rmi.RemoteExceptionpublic StorageSystem(java.util.Vector<java.lang.String> hostList,
HashtableServer paramHashtableServer)
throws java.rmi.RemoteException
hostList - paramHashtableServer - java.rmi.RemoteExceptionpublic StorageSystem(java.util.Vector<java.lang.String> hostList,
HashtableServer paramHashtableServer,
boolean writeThrough)
throws java.rmi.RemoteException
hostList - paramHashtableServer - writeThrough - java.rmi.RemoteExceptionpublic int getNumberOfServers()
public void enableStats()
public Node getNode(java.lang.String paramString) throws java.rmi.RemoteException
paramString - java.rmi.RemoteExceptionpublic Node getNode(java.lang.String paramString, boolean withCaching) throws java.rmi.RemoteException
paramString - withCaching - java.rmi.RemoteExceptionpublic java.util.Vector<Node> getNodesParallel(java.util.Vector<java.lang.String> paramVector) throws java.rmi.RemoteException
paramVector - java.rmi.RemoteExceptionpublic java.util.Vector<Node> getNodesParallel(java.util.Vector<java.lang.String> paramVector, boolean withCaching) throws java.rmi.RemoteException
paramVector - withCaching - java.rmi.RemoteExceptionpublic NodeData getNodeProperties(NodeData n) throws java.rmi.RemoteException
nodeId - properties - java.rmi.RemoteExceptionpublic java.util.Vector<NodeData> getNodePropertiesParallel(java.util.Vector<NodeData> paramVector) throws java.rmi.RemoteException
nodeIds - properties - java.rmi.RemoteExceptionpublic NodeData exec(NodeData n) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.util.Vector<NodeData> execParallel(java.util.Vector<NodeData> paramVector) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void putNode(java.lang.String paramString,
Node paramNode)
throws java.rmi.RemoteException
paramString - paramNode - java.rmi.RemoteExceptionpublic void putNodesParallel(java.util.Vector<Node> nodeList) throws java.rmi.RemoteException
nodeList - java.rmi.RemoteExceptionpublic void updateNodeProperties(NodeData n) throws java.rmi.RemoteException
n - - this is a Node data which tells what the updated properties and TS arejava.rmi.RemoteExceptionpublic void updateNodePropertiesParallel(java.util.Vector<NodeData> nodeList) throws java.rmi.RemoteException
nodeList - java.rmi.RemoteExceptionpublic java.util.Vector<java.lang.String> getAllKeys(java.lang.String url)
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic ClusterMeasures getClusterMeasures(java.lang.String url) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic boolean relocate(java.lang.String nodeId)
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic boolean relocate(java.lang.String nodeId,
boolean lock)
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.lang.String getLocationURL(java.lang.String nodeId)
public java.lang.String getLocation(java.lang.String nodeId)
public java.lang.String getStats()
public java.lang.String getStats(boolean includeHashtable)
throws java.rmi.RemoteException
includeHashtable - java.rmi.RemoteExceptionpublic HashtableServer findServer(int nodeId)
public int getServerID(int nodeID)
public java.util.Vector<Node> getLocalNodes(java.util.Vector<java.lang.String> paramVector)
public java.util.Vector<Node> getLocalNodes(java.util.Vector<java.lang.String> paramVector, boolean withCaching) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.util.Vector<Node> getAllNodes() throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic void clearStatContainers()
throws java.rmi.RemoteException
java.rmi.RemoteException