Class CopyOnWriteStateMap.StateMapEntry<K,​N,​S>

  • Type Parameters:
    K - type of key.
    N - type of namespace.
    S - type of state.
    All Implemented Interfaces:
    StateEntry<K,​N,​S>
    Enclosing class:
    CopyOnWriteStateMap<K,​N,​S>

    @VisibleForTesting
    protected static class CopyOnWriteStateMap.StateMapEntry<K,​N,​S>
    extends Object
    implements StateEntry<K,​N,​S>
    One entry in the CopyOnWriteStateMap. This is a triplet of key, namespace, and state. Thereby, key and namespace together serve as a composite key for the state. This class also contains some management meta data for copy-on-write, a pointer to link other CopyOnWriteStateMap.StateMapEntrys to a list, and cached hash code.
    • Method Detail

      • setState

        public final void setState​(@Nullable
                                   S value,
                                   int mapVersion)
      • getKey

        @Nonnull
        public K getKey()
        Description copied from interface: StateEntry
        Returns the key of this entry.
        Specified by:
        getKey in interface StateEntry<K,​N,​S>
      • getNamespace

        @Nonnull
        public N getNamespace()
        Description copied from interface: StateEntry
        Returns the namespace of this entry.
        Specified by:
        getNamespace in interface StateEntry<K,​N,​S>
      • getState

        @Nullable
        public S getState()
        Description copied from interface: StateEntry
        Returns the state of this entry.
        Specified by:
        getState in interface StateEntry<K,​N,​S>
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object