Package nxt

Class Generator

  • All Implemented Interfaces:
    java.lang.Comparable<Generator>

    public final class Generator
    extends java.lang.Object
    implements java.lang.Comparable<Generator>
    • Method Detail

      • startForging

        public static Generator startForging​(java.lang.String secretPhrase)
      • stopForging

        public static Generator stopForging​(java.lang.String secretPhrase)
      • stopForging

        public static int stopForging()
      • getGenerator

        public static Generator getGenerator​(java.lang.String secretPhrase)
      • getGeneratorCount

        public static int getGeneratorCount()
      • getAllGenerators

        public static java.util.Collection<Generator> getAllGenerators()
      • getSortedForgers

        public static java.util.List<Generator> getSortedForgers()
      • getNextHitTime

        public static long getNextHitTime​(long lastBlockId,
                                          int curTime)
      • getPublicKey

        public byte[] getPublicKey()
      • getAccountId

        public long getAccountId()
      • getDeadline

        public long getDeadline()
      • getHitTime

        public long getHitTime()
      • compareTo

        public int compareTo​(Generator g)
        Specified by:
        compareTo in interface java.lang.Comparable<Generator>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getNextGenerators

        public static java.util.List<Generator.ActiveGenerator> getNextGenerators()
        Return a list of generators for the next block. The caller must hold the blockchain read lock to ensure the integrity of the returned list.
        Returns:
        List of generator account identifiers