Class ReplicaIDRepository
java.lang.Object
com.netscape.cmscore.dbs.Repository
com.netscape.cmscore.dbs.ReplicaIDRepository
- All Implemented Interfaces:
IRepository
A class represents a replica repository. It
creates unique managed replica IDs.
- Version:
- $Revision$, $Date$
- Author:
- alee
-
Field Summary
FieldsFields inherited from class Repository
dbSubsystem, maxSerialName, mBaseDN, mCounter, mEnableRandomSerialNumbers, mIncrementNo, minSerialName, mLowWaterMarkNo, mMaxSerialNo, mMinSerialNo, mNextMaxSerialNo, mNextMinSerialNo, mRadix, nextMaxSerialName, nextMinSerialName, rangeDN, repositoryConfigModifier and TypeFieldDescriptionprotected DBSubsystemprotected Stringprotected Stringprotected BigIntegerprotected booleanprotected BigIntegerprotected Stringprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected BigIntegerprotected intprotected Stringprotected Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionReplicaIDRepository(DBSubsystem dbSubsystem) Constructs a certificate repository. -
Method Summary
Modifier and TypeMethodDescriptiongetLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound) Returns last serial number in given rangeMethods inherited from class Repository
checkRange, checkRanges, getBaseDN, getMaxSerial, getMinSerial, getNextMaxSerial, getNextRange, getNextSerialNumber, getRadix, hasRangeConflict, initCacheIfNeeded, peekNextSerialNumber, setEnableSerialMgmt, setLastSerialNo, setMaxSerial, setMaxSerialConfig, setMinSerialConfig, setNextMaxSerial, setNextMaxSerialConfig, setNextMinSerialConfig, setTheSerialNumberModifier and TypeMethodDescriptionprotected voidChecks if the given number is in the current range.voidChecks to see if a new range is needed, or if we have reached the end of the current range, or if a range conflict has occurred.Get the LDAP base DN for this repository.Get the maximum serial number.Get the minimum serial number.Get the maximum serial number in next range.Gets start of next range from database.Retrieves the next serial number, and also increase the serial number by one.intgetRadix()booleanDetermines if a range conflict has been observed in database.protected voidPeek at the next serial number in cache (does not consume the number).voidsetEnableSerialMgmt(boolean value) Sets whether serial number management is enabled for certs and requests.protected voidsetLastSerialNo(BigInteger lastSN) voidsetMaxSerial(BigInteger serial) Set the maximum serial number.voidSets maximum serial number limit in config filevoidSets minimum serial number limit in config filevoidsetNextMaxSerial(BigInteger serial) Set the maximum serial number in next rangevoidSets maximum serial number limit for next range in config filevoidSets minimum serial number limit for next range in config filevoidUpdates the serial number to the specified in db and cache.
-
Field Details
-
logger
public static org.slf4j.Logger logger
-
-
Constructor Details
-
ReplicaIDRepository
Constructs a certificate repository.- Throws:
EBaseException
-
-
Method Details
-
getLastSerialNumberInRange
public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound) throws EBaseException Returns last serial number in given range- Specified by:
getLastSerialNumberInRangein classRepository- Throws:
EBaseException
-