public class ESUIDSequencer extends AbstractUIDSequencer
UIDSequencer.
Since elasticsearch does not seem to support a notion of native sequence, the implementation uses the auto-increment of the version attribute as described in the ElasticSearch::Sequence - a blazing fast ticket server blog post.
| Modifier and Type | Field and Description |
|---|---|
protected org.elasticsearch.client.Client |
esClient |
name| Constructor and Description |
|---|
ESUIDSequencer() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Cleanup callback
|
protected void |
ensureESIndex(org.elasticsearch.client.Client esClient) |
protected org.elasticsearch.client.Client |
getClient() |
protected String |
getESIndexName() |
int |
getNext(String sequenceName)
For the given key returns the incremented UID which is also stored in the same sequence entry.
|
void |
init()
Init Sequencer
|
getName, initSequence, setNameprotected org.elasticsearch.client.Client esClient
public ESUIDSequencer()
protected org.elasticsearch.client.Client getClient()
public void dispose()
UIDSequencerdispose in interface UIDSequencerdispose in class AbstractUIDSequencerpublic int getNext(String sequenceName)
UIDSequencergetNext in interface UIDSequencergetNext in class AbstractUIDSequencerpublic void init()
UIDSequencerinit in interface UIDSequencerinit in class AbstractUIDSequencerprotected void ensureESIndex(org.elasticsearch.client.Client esClient)
protected String getESIndexName()
Copyright © 2016 Nuxeo SA. All rights reserved.