Class ChangeLoggingKeyValueBytesStore

    • Method Detail

      • approximateNumEntries

        public long approximateNumEntries()
        Description copied from interface: ReadOnlyKeyValueStore
        Return an approximate count of key-value mappings in this store. The count is not guaranteed to be exact in order to accommodate stores where an exact count is expensive to calculate.
        Specified by:
        approximateNumEntries in interface ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Returns:
        an approximate count of key-value mappings in the store.
      • put

        public void put​(org.apache.kafka.common.utils.Bytes key,
                        byte[] value)
        Description copied from interface: KeyValueStore
        Update the value associated with this key.
        Specified by:
        put in interface KeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        key - The key to associate the value to
        value - The value to update, it can be null; if the serialized bytes are also null it is interpreted as deletes
      • putIfAbsent

        public byte[] putIfAbsent​(org.apache.kafka.common.utils.Bytes key,
                                  byte[] value)
        Description copied from interface: KeyValueStore
        Update the value associated with this key, unless a value is already associated with the key.
        Specified by:
        putIfAbsent in interface KeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        key - The key to associate the value to
        value - The value to update, it can be null; if the serialized bytes are also null it is interpreted as deletes
        Returns:
        The old value or null if there is no such key.
      • putAll

        public void putAll​(List<KeyValue<org.apache.kafka.common.utils.Bytes,​byte[]>> entries)
        Description copied from interface: KeyValueStore
        Update all the given key/value pairs.
        Specified by:
        putAll in interface KeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        entries - A list of entries to put into the store; if the serialized bytes are also null it is interpreted as deletes
      • delete

        public byte[] delete​(org.apache.kafka.common.utils.Bytes key)
        Description copied from interface: KeyValueStore
        Delete the value from the store (if there is one).
        Specified by:
        delete in interface KeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        key - The key
        Returns:
        The old value or null if there is no such key.
      • get

        public byte[] get​(org.apache.kafka.common.utils.Bytes key)
        Description copied from interface: ReadOnlyKeyValueStore
        Get the value corresponding to this key.
        Specified by:
        get in interface ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        key - The key to fetch
        Returns:
        The value or null if no value is found.
      • range

        public KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> range​(org.apache.kafka.common.utils.Bytes from,
                                                                                        org.apache.kafka.common.utils.Bytes to)
        Description copied from interface: ReadOnlyKeyValueStore
        Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe from ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.
        Specified by:
        range in interface ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Parameters:
        from - The first key that could be in the range
        to - The last key that could be in the range
        Returns:
        The iterator for this range.
      • all

        public KeyValueIterator<org.apache.kafka.common.utils.Bytes,​byte[]> all()
        Description copied from interface: ReadOnlyKeyValueStore
        Return an iterator over all keys in this store. This iterator must be closed after use. The returned iterator must be safe from ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.
        Specified by:
        all in interface ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,​byte[]>
        Returns:
        An iterator of all key/value pairs in the store.