Public Member Functions | |
Range (IdentifierRange identifierRange) | |
long | getLength () |
boolean | isLocked () |
void | assignUniqueEntityId (EntityT entity) throws AcsJUidAlreadyExistsEx, AcsJRangeLockedEx, AcsJRangeExhaustedEx |
void | replaceUniqueEntityId (EntityT entity) throws AcsJUidAlreadyExistsEx, AcsJRangeLockedEx, AcsJRangeExhaustedEx |
void | assignUniqueEntityRef (EntityRefT ref) throws AcsJRangeUnlockedEx, AcsJRangeExhaustedEx |
boolean | hasNextID () |
URI | next () throws AcsJIdentifierUnexpectedEx, AcsJRangeExhaustedEx |
URI | rangeId () throws AcsJIdentifierUnexpectedEx |
final String | rangeIdString () |
Static Public Member Functions | |
final String | generateUID (String _archiveID, String _rangeID, long _localId) |
Package Functions | |
long | getMaxDocumentId () |
Private Member Functions | |
void | setUniqueEntityId (EntityT entity, boolean allowReplacing) throws AcsJUidAlreadyExistsEx, AcsJRangeLockedEx, AcsJRangeExhaustedEx |
String | getNextID () throws AcsJRangeExhaustedEx |
Private Attributes | |
final String | archiveid |
final boolean | isLocked |
final String | rangeid |
final AtomicLong | documentid |
final long | minDocumentid |
final long | maxDocumentid |
Long.MAX_VALUE
many UIDs. This class is implemented as an intelligent wrapper for the castor class IdentifierRange which itself gets generated from the schema "IdentifierRange.xsd".
For a better description, see the Archive/UidLibrary wiki page.
General remark on the length of UIDs: there is no limit on the length of the three "/x012af" parts of a UID, as was confirmed by awicenec to hsommer on 2007-04-20. It is therefore the Archive's responsibility to ensure that all code dealing with UIDs (which should all be under archive responsibility anyway) be updated accordingly whenever the actually generated UIDs exceed the "Long" limit.
|
|
|
Assigns a UID to the The same functionality is offered in ContainerServices#assignUniqueEntityId(EntityT) which actually delegates to here. |
|
Assigns a UID from the range to a given entity reference. Note that this is different from assigning a UID to an entity. This method only works if this range is locked, see isLocked().
|
|
This method is only exposed for testing purposes, when a UID has to be generated from its constituent parts. You should normally not use this method. |
|
|
|
|
|
Returns a UID that is constructed from the archiveID, the rangeID, and the running local document ID. |
|
Checks whether another UID can be pulled from this range without causing an exception due to an overflow.
Warning about thread safety: This method does not reserve a UID or anything like that, thus a returned
|
|
A range can be either locked or unlocked. This immutable property was originally called "serialised" but was considered too confusing since this logical concept has nothing to do with technically serializing the castor class to XML. TODO: explain better the real meaning of this locking, and the forseen scenarios.
|
|
cryptic comment from Simon: TODO: this needs to be moved to protected soon, will require the ArchiveID web service to be moved to this namespace
|
|
Gets the UID of this range document itself.
|
|
Gets a String representation of the UID of this range document itself. |
|
Assigns a UID to the |
|
|
|
|
|
|
|
|
|
|
|
|
|
|