Package io.etcd.jetcd
Interface KV
- All Superinterfaces:
AutoCloseable,CloseableClient
Interface of kv client talking to etcd.
-
Method Summary
Modifier and TypeMethodDescriptioncompact(long rev) compact etcd KV history before the given rev.compact(long rev, CompactOption option) compact etcd KV history before the given rev with option.delete(ByteSequence key) delete a key.delete(ByteSequence key, DeleteOption option) delete a key or range with option.get(ByteSequence key) retrieve value for the given key.get(ByteSequence key, GetOption option) retrieve keys with GetOption.put(ByteSequence key, ByteSequence value) put a key-value pair into etcd.put(ByteSequence key, ByteSequence value, PutOption option) put a key-value pair into etcd with option.txn()creates a transaction.creates a transaction.Methods inherited from interface io.etcd.jetcd.support.CloseableClient
close
-
Method Details
-
put
put a key-value pair into etcd.- Parameters:
key- key in ByteSequencevalue- value in ByteSequence- Returns:
- PutResponse
-
put
put a key-value pair into etcd with option.- Parameters:
key- key in ByteSequencevalue- value in ByteSequenceoption- PutOption- Returns:
- PutResponse
-
get
retrieve value for the given key.- Parameters:
key- key in ByteSequence- Returns:
- GetResponse
-
get
retrieve keys with GetOption.- Parameters:
key- key in ByteSequenceoption- GetOption- Returns:
- GetResponse
-
delete
delete a key.- Parameters:
key- key in ByteSequence- Returns:
- DeleteResponse
-
delete
delete a key or range with option.- Parameters:
key- key in ByteSequenceoption- DeleteOption- Returns:
- DeleteResponse
-
compact
compact etcd KV history before the given rev.All superseded keys with a revision less than the compaction revision will be removed.
- Parameters:
rev- the revision to compact.- Returns:
- CompactResponse
-
compact
compact etcd KV history before the given rev with option.All superseded keys with a revision less than the compaction revision will be removed.
- Parameters:
rev- etcd revisionoption- CompactOption- Returns:
- CompactResponse
-
txn
Txn txn()creates a transaction.- Returns:
- a Txn
-
txn
creates a transaction.- Parameters:
option- TxnOption- Returns:
- a Txn
-