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(String tag,
long capacity)
Initializes a new instance of the
HiLoKeyGenerator class. |
Modifier and Type | Method and Description |
---|---|
String |
generateDocumentKey(IDatabaseCommands databaseCommands,
DocumentConvention convention,
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(String tag, long capacity)
HiLoKeyGenerator
class.tag
- capacity
- public String generateDocumentKey(IDatabaseCommands databaseCommands, DocumentConvention convention, Object entity)
databaseCommands
- Low level database commands.convention
- Conventionentity
- The entity.public long nextId(IDatabaseCommands commands)
commands
- Copyright © 2016. All Rights Reserved.