Class MutableRecordStoreState

    • Method Detail

      • beginRead

        public void beginRead()
        Begin using this record store state. Until endRead() is called, the state will not change.
        Overrides:
        beginRead in class RecordStoreState
      • beginWrite

        public void beginWrite()
        Begin modifying this record store state. Until endWrite() is called, the state will not change.
      • endWrite

        public void endWrite()
        End modifying this record store state.
        See Also:
        beginWrite()
      • setState

        @Nonnull
        public IndexState setState​(@Nonnull
                                   String indexName,
                                   @Nonnull
                                   IndexState state)
        Modify the state of an index in this map. The caller should modify the database to match.
        Parameters:
        indexName - the index name
        state - the new state for the given index
        Returns:
        the previous state of the given index
      • equals

        public boolean equals​(Object o)
        Description copied from class: RecordStoreState
        Checks if this RecordStoreState specifies identical state as the given object.
        Overrides:
        equals in class RecordStoreState
        Parameters:
        o - the object to check for equality
        Returns:
        true if the passed object is a RecordStoreState instance and if the other state matches this RecordStoreState and false otherwise
      • hashCode

        public int hashCode()
        Description copied from class: RecordStoreState
        Creates a valid hash code of this state based on the hashes of its members.
        Overrides:
        hashCode in class RecordStoreState
        Returns:
        a hash code based off of the state's members hashes
      • toImmutable

        @Nonnull
        public RecordStoreState toImmutable()
        Description copied from class: RecordStoreState
        Create an immutable version of this RecordStoreState. If the state object is already immutable, this will return this. This version of the record store state is safe to cache as none of its members can be mutated.
        Overrides:
        toImmutable in class RecordStoreState
        Returns:
        an immutable version of this RecordStoreState