Package io.etcd.jetcd

Interface KV

    • Method Detail

      • put

        java.util.concurrent.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

        java.util.concurrent.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

        java.util.concurrent.CompletableFuture<GetResponse> get​(ByteSequence key)
        retrieve value for the given key.
        Parameters:
        key - key in ByteSequence
        Returns:
        GetResponse
      • get

        java.util.concurrent.CompletableFuture<GetResponse> get​(ByteSequence key,
                                                                GetOption option)
        retrieve keys with GetOption.
        Parameters:
        key - key in ByteSequence
        option - GetOption
        Returns:
        GetResponse
      • delete

        java.util.concurrent.CompletableFuture<DeleteResponse> delete​(ByteSequence key)
        delete a key.
        Parameters:
        key - key in ByteSequence
        Returns:
        DeleteResponse
      • delete

        java.util.concurrent.CompletableFuture<DeleteResponse> delete​(ByteSequence key,
                                                                      DeleteOption option)
        delete a key or range with option.
        Parameters:
        key - key in ByteSequence
        option - DeleteOption
        Returns:
        DeleteResponse
      • compact

        java.util.concurrent.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

        java.util.concurrent.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