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 String
getCurrentNodeName()
Returns the name of the current node.long
getNodeCount(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.boolean
isCurrentNodeAccepted(IEntityContext ec, LicenseModel systemLicense)
Checks if the current node is accepted with the given system license.void
removeCurrentNode(IEntityContext ec)
Removes the current node from the database.void
removeExpiredNodes(IEntityContext ec)
Removes all nodes that have not pinged the server for a certain amount of time.void
removeNode(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:IServerNodeDao
Checks if the current node is accepted with the given system license.- Specified by:
isCurrentNodeAccepted
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.systemLicense
- the system license to check against.- Returns:
true
if the node was accepted,false
otherwise.
-
removeNode
public void removeNode(IEntityContext ec, String nodeName)
Description copied from interface:IServerNodeDao
Adds a new node to the database.- Specified by:
removeNode
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.nodeName
- the name of the node to add.
-
removeCurrentNode
public void removeCurrentNode(IEntityContext ec)
Description copied from interface:IServerNodeDao
Removes the current node from the database.- Specified by:
removeCurrentNode
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.
-
removeExpiredNodes
public void removeExpiredNodes(IEntityContext ec)
Description copied from interface:IServerNodeDao
Removes all nodes that have not pinged the server for a certain amount of time.- Specified by:
removeExpiredNodes
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.
-
getNodeCount
public long getNodeCount(IEntityContext ec)
Description copied from interface:IServerNodeDao
Returns the number of nodes currently in the database.- Specified by:
getNodeCount
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.- Returns:
- the number of nodes.
-
getNodeNames
public List<String> getNodeNames(IEntityContext ec)
Description copied from interface:IServerNodeDao
Returns a list of all node names currently in the database.- Specified by:
getNodeNames
in interfaceIServerNodeDao
- Parameters:
ec
- the entity context.- Returns:
- a list of node names.
-
getCurrentNodeName
public String getCurrentNodeName()
Description copied from interface:IServerNodeDao
Returns the name of the current node.- Specified by:
getCurrentNodeName
in interfaceIServerNodeDao
- Returns:
- the name of the current node.
-
-