Class ClusterNodeService
- java.lang.Object
-
- io.jans.as.server.service.cluster.ClusterNodeService
-
@ApplicationScoped public class ClusterNodeService extends Object
- Version:
- 1.0, 06/03/2024
- Author:
- Yuriy Movchan
-
-
Field Summary
Fields Modifier and Type Field Description static int
ATTEMPT_LIMIT
static String
CLUSTER_TYPE_JANS_AUTH
static long
DELAY_AFTER_EXPIRATION
static String
JANS_TYPE_ATTR_NAME
static String
LOCK_KEY
-
Constructor Summary
Constructors Constructor Description ClusterNodeService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.jans.model.cluster.ClusterNode
allocate()
List<io.jans.model.cluster.ClusterNode>
getAllClusterNodes()
returns a list of all ClusterNodesio.jans.model.cluster.ClusterNode
getClusterNodeByDn(String dn)
returns ClusterNode by Dnio.jans.model.cluster.ClusterNode
getClusterNodeById(Integer id)
returns ClusterNode by Idio.jans.model.cluster.ClusterNode
getClusterNodeLast()
returns last TokenPool or null if noneList<String>
getClusterNodesDns(List<Integer> nodeIds)
List<io.jans.model.cluster.ClusterNode>
getClusterNodesExpired()
returns a list of expired ClusterNodesString
getDnForClusterNode(Integer id)
protected void
persist(io.jans.model.cluster.ClusterNode clusterNode)
void
refresh(io.jans.model.cluster.ClusterNode node)
io.jans.model.cluster.ClusterNode
reset(io.jans.model.cluster.ClusterNode node)
void
update(io.jans.model.cluster.ClusterNode clusterNode)
-
-
-
Field Detail
-
ATTEMPT_LIMIT
public static final int ATTEMPT_LIMIT
- See Also:
- Constant Field Values
-
DELAY_AFTER_EXPIRATION
public static final long DELAY_AFTER_EXPIRATION
- See Also:
- Constant Field Values
-
CLUSTER_TYPE_JANS_AUTH
public static final String CLUSTER_TYPE_JANS_AUTH
- See Also:
- Constant Field Values
-
JANS_TYPE_ATTR_NAME
public static final String JANS_TYPE_ATTR_NAME
- See Also:
- Constant Field Values
-
LOCK_KEY
public static final String LOCK_KEY
-
-
Method Detail
-
getClusterNodeByDn
public io.jans.model.cluster.ClusterNode getClusterNodeByDn(String dn)
returns ClusterNode by Dn- Returns:
- ClusterNode
-
getClusterNodeById
public io.jans.model.cluster.ClusterNode getClusterNodeById(Integer id)
returns ClusterNode by Id- Returns:
- ClusterNode
-
getAllClusterNodes
public List<io.jans.model.cluster.ClusterNode> getAllClusterNodes()
returns a list of all ClusterNodes- Returns:
- list of ClusterNodes
-
getClusterNodeLast
public io.jans.model.cluster.ClusterNode getClusterNodeLast()
returns last TokenPool or null if none- Returns:
- TokenPool
-
getClusterNodesExpired
public List<io.jans.model.cluster.ClusterNode> getClusterNodesExpired()
returns a list of expired ClusterNodes- Returns:
- list of ClusterNodes
-
persist
protected void persist(io.jans.model.cluster.ClusterNode clusterNode)
-
update
public void update(io.jans.model.cluster.ClusterNode clusterNode)
-
allocate
public io.jans.model.cluster.ClusterNode allocate()
-
refresh
public void refresh(io.jans.model.cluster.ClusterNode node)
-
reset
public io.jans.model.cluster.ClusterNode reset(io.jans.model.cluster.ClusterNode node)
-
-