public class RMDBManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RMDBManager.NodeLockUpdateAction |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ITEMS_IN_LIST |
Constructor and Description |
---|
RMDBManager(Configuration configuration,
boolean drop,
boolean dropNS)
Used only for testing purposes of the hibernate config needs to be changed.
|
Modifier and Type | Method and Description |
---|---|
void |
addNode(RMNodeData rmNodeData,
String nodeSourceName) |
boolean |
addNodeSource(NodeSourceData nodeSourceData) |
void |
changeNodesState(List<RMNodeData> nodesList,
Map<String,String> nodeSourceNameMap,
NodeState nodeState,
long stateChangeTime,
Client owner,
int usageInfoCriteriaSize) |
void |
clearLockHistory()
Removes all entries from LockHistory table.
|
void |
close() |
static RMDBManager |
createInMemoryRMDBManager() |
void |
createLockEntryOrUpdate(String nodeSource,
RMDBManager.NodeLockUpdateAction actionOnUpdate) |
void |
deleteOldNodeHistory() |
void |
deleteOldUserHistory() |
Map<String,org.objectweb.proactive.core.util.MutableInteger> |
entityToMap(List<LockHistory> lockHistoryResult) |
<T> T |
executeReadTransaction(SessionWork<T> sessionWork)
Should be used for select queries only.
|
protected <T> T |
executeReadWriteTransaction(SessionWork<T> sessionWork)
Should be used for insert/update/delete queries
|
List<?> |
executeSqlQuery(String queryStr) |
Map<String,org.objectweb.proactive.core.util.MutableInteger> |
findNodesLockedOnPreviousRun()
Returns information about the nodes which have been locked on previous RM run.
|
Alive |
findRmLastAliveEntry() |
Collection<RMNodeData> |
getAllNodes() |
RMDBManagerBuffer |
getBuffer() |
static RMDBManager |
getInstance() |
List<LockHistory> |
getLockHistories() |
RMNodeData |
getNodeByNameAndUrl(String nodeName,
String nodeUrl) |
Collection<RMNodeData> |
getNodesByNodeSource(String nodeSourceName) |
List<NodeHistory> |
getNodesHistory(long windowStart,
long windowEnd) |
NodeSourceData |
getNodeSource(String sourceName) |
Collection<NodeSourceData> |
getNodeSources() |
void |
removeAllNodes() |
void |
removeAllNodesFromNodeSource(String nodeSourceName) |
void |
removeNode(RMNode rmNode) |
void |
removeNode(RMNodeData rmNodeData,
String nodeSourceName) |
void |
removeNodeSource(String sourceName) |
void |
saveNodeHistory(NodeHistory nodeHistory) |
void |
saveUserHistory(UserHistory history) |
void |
startHouseKeeping() |
void |
updateNode(RMNodeData rmNodeData,
String nodeSourceName) |
void |
updateNodeSource(NodeSourceData nodeSourceData) |
protected void |
updateRmAliveTime() |
void |
updateUserHistory(UserHistory history) |
public RMDBManager(Configuration configuration, boolean drop, boolean dropNS)
public static RMDBManager getInstance()
public static RMDBManager createInMemoryRMDBManager()
public void startHouseKeeping()
public Alive findRmLastAliveEntry()
protected <T> T executeReadWriteTransaction(SessionWork<T> sessionWork)
public <T> T executeReadTransaction(SessionWork<T> sessionWork)
public void close()
public boolean addNodeSource(NodeSourceData nodeSourceData)
public NodeSourceData getNodeSource(String sourceName)
public void updateNodeSource(NodeSourceData nodeSourceData)
public void removeNodeSource(String sourceName)
public Collection<NodeSourceData> getNodeSources()
public void addNode(RMNodeData rmNodeData, String nodeSourceName)
public void changeNodesState(List<RMNodeData> nodesList, Map<String,String> nodeSourceNameMap, NodeState nodeState, long stateChangeTime, Client owner, int usageInfoCriteriaSize)
public void updateNode(RMNodeData rmNodeData, String nodeSourceName)
public void removeNode(RMNode rmNode)
public void removeNode(RMNodeData rmNodeData, String nodeSourceName)
public void removeAllNodes()
public void removeAllNodesFromNodeSource(String nodeSourceName)
public RMNodeData getNodeByNameAndUrl(String nodeName, String nodeUrl)
public Collection<RMNodeData> getNodesByNodeSource(String nodeSourceName)
public Collection<RMNodeData> getAllNodes()
public void saveUserHistory(UserHistory history)
public void updateUserHistory(UserHistory history)
public void saveNodeHistory(NodeHistory nodeHistory)
public void deleteOldNodeHistory()
public void deleteOldUserHistory()
public void clearLockHistory()
public Map<String,org.objectweb.proactive.core.util.MutableInteger> findNodesLockedOnPreviousRun()
The purpose of this method is to fetch the number of nodes locked per node source on the previous RM run.
public List<LockHistory> getLockHistories()
public Map<String,org.objectweb.proactive.core.util.MutableInteger> entityToMap(List<LockHistory> lockHistoryResult)
protected void updateRmAliveTime()
public void createLockEntryOrUpdate(String nodeSource, RMDBManager.NodeLockUpdateAction actionOnUpdate)
public RMDBManagerBuffer getBuffer()
public List<NodeHistory> getNodesHistory(long windowStart, long windowEnd)