Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

FENCEGET

Josh Baker edited this page Jan 19, 2017 · 3 revisions

FENCE token [length]

A fencing token is simply a number that increases. It's guaranteed to be consistent across the cluster and can never be deleted or decremented. The value is a 64-bit unsigned integer. The first FENCE call will return "1". The optional length argument, a positive 64-bit integer, can be used to increment the fencing token by length instead of by one.

Return value

Bulk string reply: the value of last assigned number from the token sequence.

Examples

> FENCE mytoken
"1"
> FENCE mytoken
"2"
> FENCE mytoken
"3"
> FENCE mytoken 7
"10"
> FENCE mytoken
"11"
Clone this wiki locally