|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.citrusleaf.CitrusleafClient.ClWriteOptions
public static class CitrusleafClient.ClWriteOptions
Container object for policy attributes used in write operations.
This object is passed in set()
, append()
,
prepend()
, add()
, and delete()
calls to specify write options. null
may be passed to use
defaults for all options.
Set expiration
and unique
directly, and call
set_generation...()
methods to override defaults.
Generation is the number of times a record has been modified (including
creation) on the server. Therefore if a write operation is creating a
record, the expected generation would be 0
.
Field Summary | |
---|---|
int |
expiration
Record is automatically removed from server this many seconds after write operation. |
boolean |
unique
Write operation is create-only, will fail if record already exists. |
Constructor Summary | |
---|---|
CitrusleafClient.ClWriteOptions()
Constructor, sets default write options. |
Method Summary | |
---|---|
void |
set_generation_dup(int generation)
Specify expected generation, and flag to duplicate if generation is not equal to that on server. |
void |
set_generation_gt(int generation)
Specify highest expected generation. |
void |
set_generation(int generation)
Specify expected generation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int expiration
public boolean unique
Constructor Detail |
---|
public CitrusleafClient.ClWriteOptions()
The object is constructed with expiration
of
0
, unique
set false
, and no
expected generation.
Method Detail |
---|
public void set_generation(int generation)
Write operation will fail if generation is set and it's not equal to the generation on the server.
generation
- expected generationpublic void set_generation_gt(int generation)
Write operation will fail if generation is set and it's less than the generation on the server. (Useful for restore after backup.)
generation
- highest expected generationpublic void set_generation_dup(int generation)
Write operation will generate duplicate record if expected generation is set and it's not the generation on the server.
generation
- expected generation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |