Class MLTransactionSequenceIdGenerator

  • All Implemented Interfaces:
    org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor

    public class MLTransactionSequenceIdGenerator
    extends java.lang.Object
    implements org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor
    Store max sequenceID in ManagedLedger properties, in order to recover transaction log.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor

        org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor.PayloadProcessorHandle
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MAX_LOCAL_TXN_ID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.bookkeeper.mledger.impl.OpAddEntry beforeAddEntry​(org.apache.bookkeeper.mledger.impl.OpAddEntry op, int numberOfMessages)  
      java.util.concurrent.CompletableFuture<java.lang.Void> onManagedLedgerLastLedgerInitialize​(java.lang.String name, org.apache.bookkeeper.client.LedgerHandle lh)  
      void onManagedLedgerPropertiesInitialize​(java.util.Map<java.lang.String,​java.lang.String> propertiesMap)  
      void onUpdateManagedLedgerInfo​(java.util.Map<java.lang.String,​java.lang.String> propertiesMap)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor

        afterFailedAddEntry, processPayloadBeforeEntryCache, processPayloadBeforeLedgerWrite
    • Field Detail

      • MAX_LOCAL_TXN_ID

        public static final java.lang.String MAX_LOCAL_TXN_ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • MLTransactionSequenceIdGenerator

        public MLTransactionSequenceIdGenerator()
    • Method Detail

      • beforeAddEntry

        public org.apache.bookkeeper.mledger.impl.OpAddEntry beforeAddEntry​(org.apache.bookkeeper.mledger.impl.OpAddEntry op,
                                                                            int numberOfMessages)
        Specified by:
        beforeAddEntry in interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor
      • onManagedLedgerPropertiesInitialize

        public void onManagedLedgerPropertiesInitialize​(java.util.Map<java.lang.String,​java.lang.String> propertiesMap)
        Specified by:
        onManagedLedgerPropertiesInitialize in interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor
      • onManagedLedgerLastLedgerInitialize

        public java.util.concurrent.CompletableFuture<java.lang.Void> onManagedLedgerLastLedgerInitialize​(java.lang.String name,
                                                                                                          org.apache.bookkeeper.client.LedgerHandle lh)
        Specified by:
        onManagedLedgerLastLedgerInitialize in interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor
      • onUpdateManagedLedgerInfo

        public void onUpdateManagedLedgerInfo​(java.util.Map<java.lang.String,​java.lang.String> propertiesMap)
        Specified by:
        onUpdateManagedLedgerInfo in interface org.apache.bookkeeper.mledger.intercept.ManagedLedgerInterceptor