Package de.xima.fc.dao.impl
Class ServerNodeDao
- java.lang.Object
-
- de.xima.fc.dao.impl.ATransactionDao
-
- de.xima.fc.dao.impl.ServerNodeDao
-
- All Implemented Interfaces:
IServerNodeDao
public class ServerNodeDao extends ATransactionDao implements IServerNodeDao
-
-
Constructor Summary
Constructors Constructor Description ServerNodeDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCurrentNodeName()Returns the name of the current node.longgetNodeCount(IEntityContext ec)Returns the number of nodes currently in the database.List<String>getNodeNames(IEntityContext ec)Returns a list of all node names currently in the database.booleanisCurrentNodeAccepted(IEntityContext ec, LicenseModel systemLicense)Checks if the current node is accepted with the given system license.voidremoveCurrentNode(IEntityContext ec)Removes the current node from the database.voidremoveExpiredNodes(IEntityContext ec)Removes all nodes that have not pinged the server for a certain amount of time.voidremoveNode(IEntityContext ec, String nodeName)Adds a new node to the database.-
Methods inherited from class de.xima.fc.dao.impl.ATransactionDao
activate, rollback
-
-
-
-
Method Detail
-
isCurrentNodeAccepted
public boolean isCurrentNodeAccepted(IEntityContext ec, LicenseModel systemLicense)
Description copied from interface:IServerNodeDaoChecks if the current node is accepted with the given system license.- Specified by:
isCurrentNodeAcceptedin interfaceIServerNodeDao- Parameters:
ec- the entity context.systemLicense- the system license to check against.- Returns:
trueif the node was accepted,falseotherwise.
-
removeNode
public void removeNode(IEntityContext ec, String nodeName)
Description copied from interface:IServerNodeDaoAdds a new node to the database.- Specified by:
removeNodein interfaceIServerNodeDao- Parameters:
ec- the entity context.nodeName- the name of the node to add.
-
removeCurrentNode
public void removeCurrentNode(IEntityContext ec)
Description copied from interface:IServerNodeDaoRemoves the current node from the database.- Specified by:
removeCurrentNodein interfaceIServerNodeDao- Parameters:
ec- the entity context.
-
removeExpiredNodes
public void removeExpiredNodes(IEntityContext ec)
Description copied from interface:IServerNodeDaoRemoves all nodes that have not pinged the server for a certain amount of time.- Specified by:
removeExpiredNodesin interfaceIServerNodeDao- Parameters:
ec- the entity context.
-
getNodeCount
public long getNodeCount(IEntityContext ec)
Description copied from interface:IServerNodeDaoReturns the number of nodes currently in the database.- Specified by:
getNodeCountin interfaceIServerNodeDao- Parameters:
ec- the entity context.- Returns:
- the number of nodes.
-
getNodeNames
public List<String> getNodeNames(IEntityContext ec)
Description copied from interface:IServerNodeDaoReturns a list of all node names currently in the database.- Specified by:
getNodeNamesin interfaceIServerNodeDao- Parameters:
ec- the entity context.- Returns:
- a list of node names.
-
getCurrentNodeName
public String getCurrentNodeName()
Description copied from interface:IServerNodeDaoReturns the name of the current node.- Specified by:
getCurrentNodeNamein interfaceIServerNodeDao- Returns:
- the name of the current node.
-
-