Interface Translog

    • Method Detail

      • closeWithDelete

        void closeWithDelete()
      • currentId

        long currentId()
        Returns the id of the current transaction log.
      • estimatedNumberOfOperations

        int estimatedNumberOfOperations()
        Returns the number of operations in the transaction log.
      • translogSizeInBytes

        long translogSizeInBytes()
        Returns the size in bytes of the translog.
      • newTransientTranslog

        void newTransientTranslog(long id)
                           throws TranslogException
        Creates a new transient translog, where added ops will be added to the current one, and to it.

        Can only be called by one thread.

        Throws:
        TranslogException
      • makeTransientCurrent

        void makeTransientCurrent()
        Swaps the transient translog to be the current one.

        Can only be called by one thread.

      • revertTransient

        void revertTransient()
        Reverts back to not have a transient translog.
      • snapshot

        Translog.Snapshot snapshot(Translog.Snapshot snapshot)
        Snapshots the delta between the current state of the translog, and the state defined by the provided snapshot. If a new translog has been created after the provided snapshot has been take, will return a snapshot on the current trasnlog.
      • clearUnreferenced

        int clearUnreferenced()
        Clears unreferenced transaction logs.
        Returns:
        the number of clean up files
      • syncNeeded

        boolean syncNeeded()
      • syncOnEachOperation

        void syncOnEachOperation(boolean syncOnEachOperation)