Trait

com.twitter.finatra.streams.stores

CachingFinatraKeyValueStore

Related Doc: package stores

Permalink

trait CachingFinatraKeyValueStore[K, V] extends FinatraKeyValueStore[K, V]

A FinatraKeyValueStore with a callback that fires when an entry is flushed into the underlying store

Linear Supertypes
FinatraKeyValueStore[K, V], KeyValueStore[K, V], ReadOnlyKeyValueStore[K, V], StateStore, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CachingFinatraKeyValueStore
  2. FinatraKeyValueStore
  3. KeyValueStore
  4. ReadOnlyKeyValueStore
  5. StateStore
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def all(): KeyValueIterator[K, V]

    Permalink
    Definition Classes
    ReadOnlyKeyValueStore
  2. abstract def approximateNumEntries(): Long

    Permalink
    Definition Classes
    ReadOnlyKeyValueStore
  3. abstract def close(): Unit

    Permalink
    Definition Classes
    StateStore
  4. abstract def delete(arg0: K): V

    Permalink
    Definition Classes
    KeyValueStore
  5. abstract def deleteRangeExperimentalWithNoChangelogUpdates(beginKeyInclusive: Array[Byte], endKeyExclusive: Array[Byte]): Unit

    Permalink

    Removes the database entries in the range ["begin_key", "end_key"), i.e., including "begin_key" and excluding "end_key".

    Removes the database entries in the range ["begin_key", "end_key"), i.e., including "begin_key" and excluding "end_key". Returns OK on success, and a non-OK status on error. It is not an error if no keys exist in the range ["begin_key", "end_key").

    This feature is currently an experimental performance optimization for deleting very large ranges of contiguous keys. Invoking it many times or on small ranges may severely degrade read performance; in particular, the resulting performance can be worse than calling Delete() for each key in the range. Note also the degraded read performance affects keys outside the deleted ranges, and affects database operations involving scans, like flush and compaction.

    Consider setting ReadOptions::ignore_range_deletions = true to speed up reads for key(s) that are known to be unaffected by range deletions.

    Note: Changelog entries will not be deleted, so this method is best used when relying on retention.ms to delete entries from the changelog

    Definition Classes
    FinatraKeyValueStore
  6. abstract def deleteWithoutGettingPriorValue(key: K): Unit

    Permalink

    Delete the value from the store (if there is one) Note: This version of delete avoids getting the prior value which keyValueStore.delete does

    Delete the value from the store (if there is one) Note: This version of delete avoids getting the prior value which keyValueStore.delete does

    key

    The key

    returns

    The old value or null if there is no such key.

    Definition Classes
    FinatraKeyValueStore
    Exceptions thrown

    NullPointerException If null is used for key.

  7. abstract def flush(): Unit

    Permalink
    Definition Classes
    StateStore
  8. abstract def get(arg0: K): V

    Permalink
    Definition Classes
    ReadOnlyKeyValueStore
  9. abstract def getOrDefault(key: K, default: ⇒ V): V

    Permalink

    Get the value corresponding to this key or return the specified default value if no key is found

    Get the value corresponding to this key or return the specified default value if no key is found

    key

    The key to fetch

    default

    The default value to return if key is not found in the store

    returns

    The value associated with the key or the default value if the key is not found

    Definition Classes
    FinatraKeyValueStore
    Exceptions thrown

    InvalidStateStoreException if the store is not initialized

    NullPointerException If null is used for key.

  10. abstract def init(arg0: ProcessorContext, arg1: StateStore): Unit

    Permalink
    Definition Classes
    StateStore
  11. abstract def isOpen(): Boolean

    Permalink
    Definition Classes
    StateStore
  12. abstract def name(): String

    Permalink
    Definition Classes
    StateStore
  13. abstract def persistent(): Boolean

    Permalink
    Definition Classes
    StateStore
  14. abstract def put(arg0: K, arg1: V): Unit

    Permalink
    Definition Classes
    KeyValueStore
  15. abstract def putAll(arg0: List[KeyValue[K, V]]): Unit

    Permalink
    Definition Classes
    KeyValueStore
  16. abstract def putIfAbsent(arg0: K, arg1: V): V

    Permalink
    Definition Classes
    KeyValueStore
  17. abstract def range(fromBytesInclusive: Array[Byte], toBytesExclusive: Array[Byte]): KeyValueIterator[K, V]

    Permalink

    Get an iterator over a given range of keys.

    Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe from java.util.ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.

    fromBytesInclusive

    Inclusive bytes to start the range scan

    toBytesExclusive

    Exclusive bytes to end the range scan

    returns

    The iterator for this range.

    Definition Classes
    FinatraKeyValueStore
    Exceptions thrown

    InvalidStateStoreException if the store is not initialized

    NullPointerException If null is used for from or to.

  18. abstract def range(fromBytes: Array[Byte]): KeyValueIterator[K, V]

    Permalink

    A range scan starting from bytes.

    A range scan starting from bytes.

    Note 1: This is an API for Advanced users only

    Note 2: If this RocksDB instance is configured in "prefix seek mode", than fromBytes will be used as a "prefix" and the iteration will end when the prefix is no longer part of the next element. Enabling "prefix seek mode" can be done by calling options.useFixedLengthPrefixExtractor. When enabled, prefix scans can take advantage of a prefix based bloom filter for better seek performance See: https://github.com/facebook/rocksdb/wiki/Prefix-Seek-API-Changes

    Definition Classes
    FinatraKeyValueStore
  19. abstract def range(from: K, to: K, allowStaleReads: Boolean): KeyValueIterator[K, V]

    Permalink

    Get an iterator over a given range of keys.

    Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe from java.util.ConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.

    from

    The first key that could be in the range

    to

    The last key that could be in the range

    allowStaleReads

    Allow stale reads when querying a caching key value store. If set to false, each query will trigger a flush of the cache.

    returns

    The iterator for this range.

    Definition Classes
    FinatraKeyValueStore
    Exceptions thrown

    InvalidStateStoreException if the store is not initialized

    NullPointerException If null is used for from or to.

  20. abstract def range(arg0: K, arg1: K): KeyValueIterator[K, V]

    Permalink
    Definition Classes
    ReadOnlyKeyValueStore
  21. abstract def registerFlushListener(listener: (K, V) ⇒ Unit): Unit

    Permalink

    Register a flush listener callback that will be called every time a cached key value store entry is flushed into the underlying RocksDB store

    Register a flush listener callback that will be called every time a cached key value store entry is flushed into the underlying RocksDB store

    listener

    Flush callback for cached entries

  22. abstract def taskId: TaskId

    Permalink

    The task id associated with this store

    The task id associated with this store

    Definition Classes
    FinatraKeyValueStore
  23. abstract def deleteRange(from: K, to: K, maxDeletes: Int = 25000): TimerResult[K]

    Permalink
    Definition Classes
    FinatraKeyValueStore
    Annotations
    @deprecated
    Deprecated

    (Since version 1/7/2019) no longer supported

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    FinatraKeyValueStore → AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    FinatraKeyValueStore → AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FinatraKeyValueStore[K, V]

Inherited from KeyValueStore[K, V]

Inherited from ReadOnlyKeyValueStore[K, V]

Inherited from StateStore

Inherited from AnyRef

Inherited from Any

Ungrouped