yu ~master (2017-08-14T10:07:44Z)
Dub
Repo
SnowflkeBase
yu
algorithm
snowflkeId
Undocumented in source.
final
class
SnowflkeBase (
int
workerIdBits
int
sequenceBits
= 10
long
twepoch
= 1488297600000L
)
if
(
sequenceBits
> 0 &&
twepoch
> 0
) {
enum
long
maxSequence
;
static if
(
workerIdBits > 0
)
enum
long
maxWorkerId
;
static if
(
workerIdBits > 0
)
enum
int
timestampLeftShift
;
static if
(!(
workerIdBits > 0
))
enum
int
timestampLeftShift
;
this
(long macid);
static if
(
workerIdBits > 0
)
MacId
[@property getter];
long
generate
();
void
witeToNext
();
}
Constructors
this
this
(long macid)
Undocumented in source.
Members
Functions
generate
long
generate
()
Undocumented in source. Be warned that the author may not have intended to support it.
witeToNext
void
witeToNext
()
Undocumented in source. Be warned that the author may not have intended to support it.
Properties
MacId
MacId
[@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
Variables
maxSequence
enum
long
maxSequence
;
Undocumented in source.
maxWorkerId
enum
long
maxWorkerId
;
Undocumented in source.
timestampLeftShift
enum
int
timestampLeftShift
;
Undocumented in source.
timestampLeftShift
enum
int
timestampLeftShift
;
Undocumented in source.
Meta
Source
See Implementation
yu
algorithm
snowflkeId
aliases
SnowflkeID
classes
SnowflkeBase