Class AbstractStatusIndexPoolService<T extends io.jans.model.token.AbstractIndexPool>
java.lang.Object
io.jans.as.server.service.cluster.AbstractStatusIndexPoolService<T>
- Direct Known Subclasses:
StatusIndexPoolService
public abstract class AbstractStatusIndexPoolService<T extends io.jans.model.token.AbstractIndexPool>
extends Object
- Version:
- 1.0, 06/03/2024
- Author:
- Yuriy Movchan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic longstatic longstatic long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocate(int nodeId) abstract StringbaseDn()createDn(int id) Returns a list of all poolsgetNodePools(Integer nodeId) Returns a list of all pools associated with ClusterNodegetPoolByDn(String dn) Returns pool by dngetPoolById(int id) Returns pool by IdgetPoolByIndex(int index) Gets pool by global status list indexReturns last (max) pool or null if noneReturns a list of expired poolsabstract intvoidinit()abstract Stringabstract voidmarkAllIndexesAsValid(List<Integer> enumerateAllIndexes) protected voidstatic io.jans.model.token.AbstractIndexPoolsetIndexes(io.jans.model.token.AbstractIndexPool pool, int indexAllocationBlockSize) voidupdateWithLock(String poolDn, List<Integer> indexes, io.jans.model.tokenstatus.TokenStatus status)
-
Field Details
-
ATTEMPT_LIMIT
public static final int ATTEMPT_LIMIT- See Also:
-
DELAY_AFTER_EXPIRATION
public static long DELAY_AFTER_EXPIRATION -
LOCK_WAIT_BEFORE_UPDATE
public static long LOCK_WAIT_BEFORE_UPDATE -
DELAY_IF_LOCKED
public static long DELAY_IF_LOCKED
-
-
Constructor Details
-
AbstractStatusIndexPoolService
public AbstractStatusIndexPoolService()
-
-
Method Details
-
setIndexes
public static io.jans.model.token.AbstractIndexPool setIndexes(io.jans.model.token.AbstractIndexPool pool, int indexAllocationBlockSize) -
init
@PostConstruct public void init() -
getPoolByDn
Returns pool by dn- Returns:
- pool
-
getPoolById
Returns pool by Id- Returns:
- pool
-
getAllPools
Returns a list of all pools- Returns:
- list of pools
-
getPoolLast
Returns last (max) pool or null if none- Returns:
- pool
-
getPoolByIndex
Gets pool by global status list index- Parameters:
index- status list index- Returns:
- pool
-
getNodePools
Returns a list of all pools associated with ClusterNode- Returns:
- list of pools
-
getPoolsExpired
Returns a list of expired pools- Returns:
- list of pools
-
persist
-
update
-
updateWithLock
public T updateWithLock(String poolDn, List<Integer> indexes, io.jans.model.tokenstatus.TokenStatus status) throws IOException - Throws:
IOException
-
allocate
public T allocate(int nodeId) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException -
baseDn
-
getStatusListBitSize
public abstract int getStatusListBitSize() -
getEntityClass
-
markAllIndexesAsValid
-
logPrefix
-
createDn
-