public class DbIdGenerator extends Object implements IdGenerator
Modifier and Type | Field and Description |
---|---|
protected CommandExecutor |
commandExecutor |
protected int |
idBlockSize |
protected long |
lastId |
protected long |
nextId |
Constructor and Description |
---|
DbIdGenerator() |
Modifier and Type | Method and Description |
---|---|
CommandExecutor |
getCommandExecutor() |
int |
getIdBlockSize() |
protected void |
getNewBlock() |
String |
getNextId() |
void |
reset()
Reset inner state so that the generator fetches a new block of IDs from the database
when the next ID generation request is received.
|
void |
setCommandExecutor(CommandExecutor commandExecutor) |
void |
setIdBlockSize(int idBlockSize) |
protected int idBlockSize
protected long nextId
protected long lastId
protected CommandExecutor commandExecutor
public String getNextId()
getNextId
in interface IdGenerator
protected void getNewBlock()
public int getIdBlockSize()
public void setIdBlockSize(int idBlockSize)
public CommandExecutor getCommandExecutor()
public void setCommandExecutor(CommandExecutor commandExecutor)
public void reset()
Copyright © 2022. All rights reserved.