nxt.blockchain

## Class Bundler

- java.lang.Object
- - nxt.blockchain.Bundler

-     public final class Bundler
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `Bundler.FeeCalculator`
    `static interface` | `Bundler.Filter` Bundling filter - transactions for which the `Bundler.Filter.ok(Bundler, ChildTransaction)` method returns false are not processed by the `Bundler.Rule`
    `static class` | `Bundler.MinFeeCalculator`
    `static class` | `Bundler.ProportionalFeeCalculator`
    `static class` | `Bundler.Rule` Bundling rule - transactions that match the filter and minimum rate of the rule are bundled.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Bundler` | `addBundlingRule(ChildChain childChain, java.lang.String secretPhrase, Bundler.Rule rule)`
    `static Bundler` | `addOrChangeBundler(ChildChain childChain, java.lang.String secretPhrase, long totalFeesLimitFQT, java.util.List<Bundler.Rule> bundlingRules)`
    `static Bundler.Filter` | `createBundlingFilter(java.lang.String name, java.lang.String parameter)`
    `static Bundler.Rule` | `createBundlingRule(long minRateNQTPerFXT, long overpayFQTPerFXT, java.lang.String feeCalculatorName, java.util.List<Bundler.Filter> filters)`
    `static java.util.List<Bundler>` | `getAccountBundlers(long accountId)`
    `long` | `getAccountId()`
    `static java.util.List<Bundler>` | `getAllBundlers()`
    `static java.util.Collection<Bundler.FeeCalculator>` | `getAvailableFeeCalculators()`
    `static java.util.Collection<Bundler.Filter>` | `getAvailableFilters()`
    `static Bundler` | `getBundler(ChildChain childChain, long accountId)`
    `BundlerRate` | `getBundlerRate()`
    `static java.util.List<BundlerRate>` | `getBundlerRates()`
    `java.util.List<Bundler.Rule>` | `getBundlingRules()`
    `ChildChain` | `getChildChain()`
    `static java.util.List<Bundler>` | `getChildChainBundlers(ChildChain childChain)`
    `long` | `getCurrentTotalFeesFQT()`
    `byte[]` | `getPublicKey()`
    `long` | `getTotalFeesLimitFQT()`
    `static void` | `init()`
    `static void` | `stopAccountBundlers(long accountId)`
    `static void` | `stopAllBundlers()`
    `static Bundler` | `stopBundler(ChildChain childChain, long accountId)`
    `static void` | `stopChildChainBundlers(ChildChain childChain)`

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

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

- - ### Method Detail

    - #### getBundler

          public static Bundler getBundler(ChildChain childChain,
                                           long accountId)

    - #### createBundlingFilter

          public static Bundler.Filter createBundlingFilter(java.lang.String name,
                                                            java.lang.String parameter)

    - #### createBundlingRule

          public static Bundler.Rule createBundlingRule(long minRateNQTPerFXT,
                                                        long overpayFQTPerFXT,
                                                        java.lang.String feeCalculatorName,
                                                        java.util.List<Bundler.Filter> filters)

    - #### addOrChangeBundler

          public static Bundler addOrChangeBundler(ChildChain childChain,
                                                   java.lang.String secretPhrase,
                                                   long totalFeesLimitFQT,
                                                   java.util.List<Bundler.Rule> bundlingRules)

    - #### addBundlingRule

          public static Bundler addBundlingRule(ChildChain childChain,
                                                java.lang.String secretPhrase,
                                                Bundler.Rule rule)

    - #### getAllBundlers

          public static java.util.List<Bundler> getAllBundlers()

    - #### getChildChainBundlers

          public static java.util.List<Bundler> getChildChainBundlers(ChildChain childChain)

    - #### getAccountBundlers

          public static java.util.List<Bundler> getAccountBundlers(long accountId)

    - #### getBundlerRates

          public static java.util.List<BundlerRate> getBundlerRates()

    - #### stopBundler

          public static Bundler stopBundler(ChildChain childChain,
                                            long accountId)

    - #### stopAccountBundlers

          public static void stopAccountBundlers(long accountId)

    - #### stopChildChainBundlers

          public static void stopChildChainBundlers(ChildChain childChain)

    - #### stopAllBundlers

          public static void stopAllBundlers()

    - #### getAvailableFilters

          public static java.util.Collection<Bundler.Filter> getAvailableFilters()

    - #### getAvailableFeeCalculators

          public static java.util.Collection<Bundler.FeeCalculator> getAvailableFeeCalculators()

    - #### init

          public static void init()

    - #### getChildChain

          public final ChildChain getChildChain()

    - #### getPublicKey

          public final byte[] getPublicKey()

    - #### getAccountId

          public final long getAccountId()

    - #### getTotalFeesLimitFQT

          public final long getTotalFeesLimitFQT()

    - #### getCurrentTotalFeesFQT

          public final long getCurrentTotalFeesFQT()

    - #### getBundlingRules

          public java.util.List<Bundler.Rule> getBundlingRules()

    - #### getBundlerRate

          public final BundlerRate getBundlerRate()

      Returns:
        Minimum rate among unfiltered rules, `null` if all rules are filtered