public interface LightIdProvider
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LightIdProvider.Generator
Id generator
|
static interface |
LightIdProvider.Loader
the Loader to load LightId via Segment
|
static class |
LightIdProvider.Segment
Immutable LightId Segment
|
| Modifier and Type | Method and Description |
|---|---|
default long |
next(@NotNull String name,
int block)
get the next LightId by its block and name, default timeout is 1 second.
|
long |
next(@NotNull String name,
int block,
long timeout)
get the next LightId by its block and name ,within the specify timeout(ms)
|
default long next(@NotNull
@NotNull String name,
int block)
name - Id nameblock - block aka. data center in db clusterNoSuchElementException - if name not exist.IllegalArgumentException - block is out of range.IllegalStateException - sequence is out of range, or the bad internal state.TimeoutRuntimeException - default timeout is 1 second.long next(@NotNull
@NotNull String name,
int block,
long timeout)
name - Id nameblock - block aka. data center in db clustertimeout - timeout in ms, 0(unlimited) is NOT recommended, as much as possible to meet the business performance requirements.NoSuchElementException - if name not exist.IllegalArgumentException - block is out of range.IllegalStateException - sequence is out of range, or the bad internal state.TimeoutRuntimeException - timeout.Copyright © 2023. All rights reserved.