public class ESUIDSequencer extends Object implements UIDSequencer
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 |
---|---|
static String |
IDX_NAME |
static String |
IDX_TYPE |
static String |
SEQUENCER_CONTRIB |
Constructor and Description |
---|
ESUIDSequencer() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Cleanup callback
|
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
|
public static final String SEQUENCER_CONTRIB
public static final String IDX_NAME
public static final String IDX_TYPE
public void dispose()
UIDSequencer
dispose
in interface UIDSequencer
public int getNext(String sequenceName)
UIDSequencer
getNext
in interface UIDSequencer
public void init()
UIDSequencer
init
in interface UIDSequencer
Copyright © 2015 Nuxeo SA. All rights reserved.