io.etcd.jetcd

## Interface KV

All Superinterfaces:
  AutoCloseable, CloseableClient

    @Beta
    public interface KV
    extends CloseableClient

Interface of kv client talking to etcd.

### Method Summary

All Methods Instance Methods Abstract Methods
`CompletableFuture<CompactResponse>` `compact(long rev)` compact etcd KV history before the given rev.
`CompletableFuture<CompactResponse>` `compact(long rev, CompactOption option)` compact etcd KV history before the given rev with option.
`CompletableFuture<DeleteResponse>` `delete(ByteSequence key)` delete a key.
`CompletableFuture<DeleteResponse>` `delete(ByteSequence key, DeleteOption option)` delete a key or range with option.
`CompletableFuture<GetResponse>` `get(ByteSequence key)` retrieve value for the given key.
`CompletableFuture<GetResponse>` `get(ByteSequence key, GetOption option)` retrieve keys with GetOption.
`CompletableFuture<PutResponse>` `put(ByteSequence key, ByteSequence value)` put a key-value pair into etcd.
`CompletableFuture<PutResponse>` `put(ByteSequence key, ByteSequence value, PutOption option)` put a key-value pair into etcd with option.
`Txn` `txn()` creates a transaction.

### Methods inherited from interface io.etcd.jetcd.CloseableClient

`close`

### Method Detail

#### put

    CompletableFuture<PutResponse> put(ByteSequence key,
                                       ByteSequence value)

put a key-value pair into etcd.

Parameters:
  `key` - key in ByteSequence
  `value` - value in ByteSequence
Returns:
  PutResponse

#### put

    CompletableFuture<PutResponse> put(ByteSequence key,
                                       ByteSequence value,
                                       PutOption option)

put a key-value pair into etcd with option.

Parameters:
  `key` - key in ByteSequence
  `value` - value in ByteSequence
  `option` - PutOption
Returns:
  PutResponse

#### get

    CompletableFuture<GetResponse> get(ByteSequence key)

retrieve value for the given key.

Parameters:
  `key` - key in ByteSequence
Returns:
  GetResponse

#### get

    CompletableFuture<GetResponse> get(ByteSequence key,
                                       GetOption option)

retrieve keys with GetOption.

Parameters:
  `key` - key in ByteSequence
  `option` - GetOption
Returns:
  GetResponse

#### delete

    CompletableFuture<DeleteResponse> delete(ByteSequence key)

delete a key.

Parameters:
  `key` - key in ByteSequence
Returns:
  DeleteResponse

#### delete

    CompletableFuture<DeleteResponse> delete(ByteSequence key,
                                             DeleteOption option)

delete a key or range with option.

Parameters:
  `key` - key in ByteSequence
  `option` - DeleteOption
Returns:
  DeleteResponse

#### compact

    CompletableFuture<CompactResponse> compact(long rev)

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

    CompletableFuture<CompactResponse> compact(long rev,
                                               CompactOption option)

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 revision
  `option` - CompactOption
Returns:
  CompactResponse

#### txn

    Txn txn()

creates a transaction.

Returns:
  a Txn