nxt.blockchain

## Class TransactionProcessorImpl

- java.lang.Object
- - nxt.blockchain.TransactionProcessorImpl

- All Implemented Interfaces:
    TransactionProcessor, Observable<java.util.List<? extends Transaction>,TransactionProcessor.Event>

      public final class TransactionProcessorImpl
      extends java.lang.Object
      implements TransactionProcessor

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface nxt.blockchain.TransactionProcessor

      `TransactionProcessor.Event`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addListener(Listener<java.util.List<? extends Transaction>> listener, TransactionProcessor.Event eventType)`
    `void` | `broadcast(Transaction transaction)`
    `void` | `broadcastLater(Transaction transaction)`
    `void` | `clearUnconfirmedTransactions()`
    `TransactionImpl[]` | `getAllBroadcastedTransactions()`
    `java.util.List<java.lang.Long>` | `getAllUnconfirmedTransactionIds()`
    `DbIterator<UnconfirmedTransaction>` | `getAllUnconfirmedTransactions()`
    `DbIterator<UnconfirmedTransaction>` | `getAllUnconfirmedTransactions(int from, int to)`
    `DbIterator<UnconfirmedTransaction>` | `getAllUnconfirmedTransactions(int from, int to, java.lang.String sort)`
    `DbIterator<UnconfirmedTransaction>` | `getAllUnconfirmedTransactions(java.lang.String sort)`
    `UnconfirmedTransaction[]` | `getAllWaitingTransactions()`
    `java.util.SortedSet<? extends Transaction>` | `getCachedUnconfirmedTransactions(java.util.List<java.lang.Long> exclude)` Get the cached unconfirmed transactions
    `static TransactionProcessorImpl` | `getInstance()`
    `DbIterator<UnconfirmedTransaction>` | `getUnconfirmedChildTransactions(ChildChain childChain)`
    `DbIterator<UnconfirmedTransaction>` | `getUnconfirmedFxtTransactions()`
    `UnconfirmedTransaction` | `getUnconfirmedTransaction(long transactionId)`
    `java.util.Collection<UnconfirmedTransaction>` | `getWaitingTransactions()`
    `static void` | `init()`
    `void` | `notifyListeners(java.util.List<? extends Transaction> transactions, TransactionProcessor.Event eventType)`
    `void` | `processLater(java.util.Collection<? extends FxtTransaction> transactions)`
    `java.util.List<TransactionImpl>` | `processPeerTransactions(java.util.List<Transaction> transactions)`
    `void` | `rebroadcastAllUnconfirmedTransactions()`
    `boolean` | `removeListener(Listener<java.util.List<? extends Transaction>> listener, TransactionProcessor.Event eventType)`
    `void` | `requeueAllUnconfirmedTransactions()`
    `java.util.List<Transaction>` | `restorePrunableData(java.util.List<Transaction> transactions)` Restore expired prunable data

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static TransactionProcessorImpl getInstance()

    - #### init

          public static void init()

    - #### addListener

          public boolean addListener(Listener<java.util.List<? extends Transaction>> listener,
                                     TransactionProcessor.Event eventType)

      Specified by:
        `addListener` in interface `Observable<java.util.List<? extends Transaction>,TransactionProcessor.Event>`

    - #### removeListener

          public boolean removeListener(Listener<java.util.List<? extends Transaction>> listener,
                                        TransactionProcessor.Event eventType)

      Specified by:
        `removeListener` in interface `Observable<java.util.List<? extends Transaction>,TransactionProcessor.Event>`

    - #### notifyListeners

          public void notifyListeners(java.util.List<? extends Transaction> transactions,
                                      TransactionProcessor.Event eventType)

    - #### getAllUnconfirmedTransactions

          public DbIterator<UnconfirmedTransaction> getAllUnconfirmedTransactions()

      Specified by:
        `getAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### getAllUnconfirmedTransactions

          public DbIterator<UnconfirmedTransaction> getAllUnconfirmedTransactions(int from,
                                                                                  int to)

      Specified by:
        `getAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### getAllUnconfirmedTransactions

          public DbIterator<UnconfirmedTransaction> getAllUnconfirmedTransactions(java.lang.String sort)

      Specified by:
        `getAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### getAllUnconfirmedTransactions

          public DbIterator<UnconfirmedTransaction> getAllUnconfirmedTransactions(int from,
                                                                                  int to,
                                                                                  java.lang.String sort)

      Specified by:
        `getAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### getUnconfirmedFxtTransactions

          public DbIterator<UnconfirmedTransaction> getUnconfirmedFxtTransactions()

      Specified by:
        `getUnconfirmedFxtTransactions` in interface `TransactionProcessor`

    - #### getUnconfirmedChildTransactions

          public DbIterator<UnconfirmedTransaction> getUnconfirmedChildTransactions(ChildChain childChain)

      Specified by:
        `getUnconfirmedChildTransactions` in interface `TransactionProcessor`

    - #### getUnconfirmedTransaction

          public UnconfirmedTransaction getUnconfirmedTransaction(long transactionId)

      Specified by:
        `getUnconfirmedTransaction` in interface `TransactionProcessor`

    - #### getAllUnconfirmedTransactionIds

          public java.util.List<java.lang.Long> getAllUnconfirmedTransactionIds()

      Specified by:
        `getAllUnconfirmedTransactionIds` in interface `TransactionProcessor`

    - #### getAllWaitingTransactions

          public UnconfirmedTransaction[] getAllWaitingTransactions()

      Specified by:
        `getAllWaitingTransactions` in interface `TransactionProcessor`

    - #### getWaitingTransactions

          public java.util.Collection<UnconfirmedTransaction> getWaitingTransactions()

    - #### getAllBroadcastedTransactions

          public TransactionImpl[] getAllBroadcastedTransactions()

      Specified by:
        `getAllBroadcastedTransactions` in interface `TransactionProcessor`

    - #### broadcast

          public void broadcast(Transaction transaction)
                         throws NxtException.ValidationException

      Specified by:
        `broadcast` in interface `TransactionProcessor`
      Throws:
        `NxtException.ValidationException`

    - #### broadcastLater

          public void broadcastLater(Transaction transaction)

      Specified by:
        `broadcastLater` in interface `TransactionProcessor`

    - #### clearUnconfirmedTransactions

          public void clearUnconfirmedTransactions()

      Specified by:
        `clearUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### requeueAllUnconfirmedTransactions

          public void requeueAllUnconfirmedTransactions()

      Specified by:
        `requeueAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### rebroadcastAllUnconfirmedTransactions

          public void rebroadcastAllUnconfirmedTransactions()

      Specified by:
        `rebroadcastAllUnconfirmedTransactions` in interface `TransactionProcessor`

    - #### processLater

          public void processLater(java.util.Collection<? extends FxtTransaction> transactions)

      Specified by:
        `processLater` in interface `TransactionProcessor`

    - #### processPeerTransactions

          public java.util.List<TransactionImpl> processPeerTransactions(java.util.List<Transaction> transactions)
                                                                  throws NxtException.NotValidException

      Specified by:
        `processPeerTransactions` in interface `TransactionProcessor`
      Throws:
        `NxtException.NotValidException`

    - #### getCachedUnconfirmedTransactions

          public java.util.SortedSet<? extends Transaction> getCachedUnconfirmedTransactions(java.util.List<java.lang.Long> exclude)

      Get the cached unconfirmed transactions
      Specified by:
        `getCachedUnconfirmedTransactions` in interface `TransactionProcessor`
      Parameters:
        `exclude` - List of transaction identifiers to exclude

    - #### restorePrunableData

          public java.util.List<Transaction> restorePrunableData(java.util.List<Transaction> transactions)

      Restore expired prunable data
      Specified by:
        `restorePrunableData` in interface `TransactionProcessor`
      Parameters:
        `transactions` - Transactions containing prunable data
      Returns:
        Processed transactions