public final class HashTableThriftHandler extends java.lang.Object implements HashtableServer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
RPC_MECHANISM |
| Constructor and Description |
|---|
HashTableThriftHandler(StorageSystem storagesystem,
java.lang.String host,
Config configParams) |
| Modifier and Type | Method and Description |
|---|---|
int |
acquireLocks(java.util.SortedSet<LockRequest> lockRequests) |
void |
cacheEvictMasterNotify(java.lang.String cachingServerId,
java.util.Hashtable<java.lang.String,java.lang.Long> evictedNodes) |
void |
cacheInvalidate(java.lang.String nodeID) |
java.util.Vector<ResultObject> |
cachePut(java.util.Map<java.lang.Integer,java.util.Vector<Node>> nodes,
long storageSystemThreadId) |
ResultObject |
cachePut(java.lang.String nodeID,
Node node,
int masterCopySite,
long storageSystemThreadId) |
void |
checkpoint() |
void |
clearStatContainers() |
void |
commitChanges(java.util.Set<Node> write,
java.util.Set<NodeData> writeNd,
java.util.Map<java.lang.String,java.lang.Long> read) |
boolean |
contains(java.lang.String key) |
ResultObject |
exec(NodeData nd) |
java.util.Vector<ResultObject> |
execBulk(java.util.Vector<NodeData> keyList) |
ResultObject |
get(java.lang.String key,
long storageSystemThreadId) |
java.util.Vector<java.lang.String> |
getAllKeys() |
java.util.Vector<Node> |
getAllNodes() |
java.util.Vector<Node> |
getCachedObjects(java.util.Vector<java.lang.String> nodeIds) |
java.util.Vector<ResultObject> |
getLocalNodes(java.util.Vector<java.lang.String> nodeIds,
long storageSystemThreadId) |
Node |
getNodeForCaching(java.lang.String nodeID,
int cachingSite) |
Node |
getNodeFromCacheTable(java.lang.String nodeId) |
Node |
getNodeFromTable(java.lang.String nodeId) |
ResultObject |
getNodeProperties(NodeData nodeData) |
java.util.Vector<Node> |
getNodesForCaching(java.util.Vector<java.lang.String> nodeIds,
int callingSite) |
int |
getNumServers() |
java.util.Vector<ResultObject> |
getObjects(java.util.Vector<java.lang.String> keyList) |
java.util.Vector<ResultObject> |
getObjectsProperties(java.util.Vector<NodeData> vec) |
int |
getServerId() |
java.lang.String |
getStats() |
void |
loadNodes(java.util.Vector<Node> nodes) |
void |
locationChange(int nodeId,
java.lang.String serverName) |
ResultObject |
lock(int nodeId) |
java.util.Date |
ping() |
ResultObject |
put(java.lang.String key,
java.lang.Object value) |
ResultObject |
put(java.lang.String key,
java.lang.Object value,
int callingServerId) |
java.util.Vector<ResultObject> |
putObjects(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> objList) |
java.util.Vector<ResultObject> |
putObjects(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> objList,
int callerServerId) |
void |
releaseLock(java.util.SortedSet<LockRequest> lockRequests) |
ResultObject |
relocate(int nodeId,
java.lang.String serverName) |
void |
removeLocationTableEntry(java.lang.String key) |
void |
setNumServers(int n) |
ResultObject |
updateNodeProperties(NodeData nodeData) |
java.util.Vector<ResultObject> |
updateNodePropertiesParallel(java.util.Vector<NodeData> vec) |
void |
writeThroughToCache(java.lang.String paramString,
java.lang.Object value) |
void |
writeThroughToCacheBulk(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> map) |
public HashTableThriftHandler(StorageSystem storagesystem, java.lang.String host, Config configParams)
public ResultObject updateNodeProperties(NodeData nodeData) throws java.rmi.RemoteException
updateNodeProperties in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject getNodeProperties(NodeData nodeData) throws java.rmi.RemoteException
getNodeProperties in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> updateNodePropertiesParallel(java.util.Vector<NodeData> vec) throws java.rmi.RemoteException
updateNodePropertiesParallel in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> getObjectsProperties(java.util.Vector<NodeData> vec) throws java.rmi.RemoteException
getObjectsProperties in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Date ping()
throws java.rmi.RemoteException
ping in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject put(java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException
put in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject put(java.lang.String key, java.lang.Object value, int callingServerId) throws java.rmi.RemoteException
put in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject get(java.lang.String key, long storageSystemThreadId) throws java.rmi.RemoteException
get in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> getObjects(java.util.Vector<java.lang.String> keyList) throws java.rmi.RemoteException
getObjects in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> putObjects(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> objList) throws java.rmi.RemoteException
putObjects in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject exec(NodeData nd) throws java.rmi.RemoteException
exec in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> execBulk(java.util.Vector<NodeData> keyList) throws java.rmi.RemoteException
execBulk in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> putObjects(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> objList, int callerServerId) throws java.rmi.RemoteException
putObjects in interface HashtableServerjava.rmi.RemoteExceptionpublic boolean contains(java.lang.String key)
throws java.rmi.RemoteException
contains in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<Node> getAllNodes() throws java.rmi.RemoteException
getAllNodes in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<java.lang.String> getAllKeys()
throws java.rmi.RemoteException
getAllKeys in interface HashtableServerjava.rmi.RemoteExceptionpublic java.lang.String getStats()
throws java.rmi.RemoteException
getStats in interface HashtableServerjava.rmi.RemoteExceptionpublic void clearStatContainers()
throws java.rmi.RemoteException
clearStatContainers in interface HashtableServerjava.rmi.RemoteExceptionpublic Node getNodeFromTable(java.lang.String nodeId) throws java.rmi.RemoteException
getNodeFromTable in interface HashtableServerjava.rmi.RemoteExceptionpublic void loadNodes(java.util.Vector<Node> nodes) throws java.rmi.RemoteException
loadNodes in interface HashtableServerjava.rmi.RemoteExceptionpublic int getServerId()
throws java.rmi.RemoteException
getServerId in interface HashtableServerjava.rmi.RemoteExceptionpublic int getNumServers()
throws java.rmi.RemoteException
getNumServers in interface HashtableServerjava.rmi.RemoteExceptionpublic void setNumServers(int n)
throws java.rmi.RemoteException
setNumServers in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject relocate(int nodeId, java.lang.String serverName) throws java.rmi.RemoteException
relocate in interface HashtableServerjava.rmi.RemoteExceptionpublic void locationChange(int nodeId,
java.lang.String serverName)
throws java.rmi.RemoteException
locationChange in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject lock(int nodeId) throws java.rmi.RemoteException
lock in interface HashtableServerjava.rmi.RemoteExceptionpublic void removeLocationTableEntry(java.lang.String key)
throws java.rmi.RemoteException
removeLocationTableEntry in interface HashtableServerjava.rmi.RemoteExceptionpublic void cacheInvalidate(java.lang.String nodeID)
throws java.rmi.RemoteException
cacheInvalidate in interface HashtableServerjava.rmi.RemoteExceptionpublic Node getNodeForCaching(java.lang.String nodeID, int cachingSite) throws java.rmi.RemoteException
getNodeForCaching in interface HashtableServerjava.rmi.RemoteExceptionpublic ResultObject cachePut(java.lang.String nodeID, Node node, int masterCopySite, long storageSystemThreadId) throws java.rmi.RemoteException
cachePut in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> cachePut(java.util.Map<java.lang.Integer,java.util.Vector<Node>> nodes, long storageSystemThreadId) throws java.rmi.RemoteException
cachePut in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<ResultObject> getLocalNodes(java.util.Vector<java.lang.String> nodeIds, long storageSystemThreadId) throws java.rmi.RemoteException
getLocalNodes in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<Node> getNodesForCaching(java.util.Vector<java.lang.String> nodeIds, int callingSite) throws java.rmi.RemoteException
getNodesForCaching in interface HashtableServerjava.rmi.RemoteExceptionpublic void writeThroughToCache(java.lang.String paramString,
java.lang.Object value)
throws java.rmi.RemoteException
writeThroughToCache in interface HashtableServerjava.rmi.RemoteExceptionpublic void writeThroughToCacheBulk(java.util.concurrent.ConcurrentHashMap<java.lang.String,Node> map) throws java.rmi.RemoteException
writeThroughToCacheBulk in interface HashtableServerjava.rmi.RemoteExceptionpublic Node getNodeFromCacheTable(java.lang.String nodeId) throws java.rmi.RemoteException
getNodeFromCacheTable in interface HashtableServerjava.rmi.RemoteExceptionpublic java.util.Vector<Node> getCachedObjects(java.util.Vector<java.lang.String> nodeIds) throws java.rmi.RemoteException
getCachedObjects in interface HashtableServerjava.rmi.RemoteExceptionpublic void cacheEvictMasterNotify(java.lang.String cachingServerId,
java.util.Hashtable<java.lang.String,java.lang.Long> evictedNodes)
throws java.rmi.RemoteException
cacheEvictMasterNotify in interface HashtableServerjava.rmi.RemoteExceptionpublic void checkpoint()
checkpoint in interface HashtableServerpublic int acquireLocks(java.util.SortedSet<LockRequest> lockRequests) throws java.rmi.RemoteException
acquireLocks in interface HashtableServerjava.rmi.RemoteExceptionpublic void releaseLock(java.util.SortedSet<LockRequest> lockRequests) throws java.rmi.RemoteException
releaseLock in interface HashtableServerjava.rmi.RemoteExceptionpublic void commitChanges(java.util.Set<Node> write, java.util.Set<NodeData> writeNd, java.util.Map<java.lang.String,java.lang.Long> read) throws java.rmi.RemoteException
commitChanges in interface HashtableServerjava.rmi.RemoteException