public class HiLoKeyGenerator extends HiLoKeyGeneratorBase
HiLoKeyGeneratorBase.RangeValue
baseCapacity, capacity, lastRequestedUtc1, lastRequestedUtc2, lastServerPrefix, RAVEN_KEY_GENERATORS_HILO, RAVEN_KEY_SERVER_PREFIX, tag
Constructor and Description |
---|
HiLoKeyGenerator(java.lang.String tag,
long capacity)
Initializes a new instance of the
HiLoKeyGenerator class. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateDocumentKey(IDatabaseCommands databaseCommands,
DocumentConvention convention,
java.lang.Object entity)
Generates the document key.
|
long |
nextId(IDatabaseCommands commands)
Create the next id (numeric)
|
getDocumentKeyFromId, getHiLoDocumentKey, getMaxFromDocument, getRange, handleGetDocumentResult, isDisableCapacityChanges, modifyCapacityIfRequired, setDisableCapacityChanges, setRange
public HiLoKeyGenerator(java.lang.String tag, long capacity)
HiLoKeyGenerator
class.tag
- capacity
- public java.lang.String generateDocumentKey(IDatabaseCommands databaseCommands, DocumentConvention convention, java.lang.Object entity)
databaseCommands
- convention
- entity
- public long nextId(IDatabaseCommands commands)
commands
- Copyright © 2014. All Rights Reserved.