Class OmniLayerRichListService<N extends Number & Comparable<? super N>,ID>

java.lang.Object
foundation.omni.netapi.analytics.OmniLayerRichListService<N,ID>
All Implemented Interfaces:
RichListService<N,ID>

public class OmniLayerRichListService<N extends Number & Comparable<? super N>,ID> extends Object implements RichListService<N,ID>
Omni protocol rich list service that provides Single and Observable interfaces for getting rich list information by property. WARNING: Incubating. WARNING: We're seriously lying about how GENERIC we really are: N must be OmniValue and ID must be CurrencyID.
  • Constructor Details

    • OmniLayerRichListService

      public OmniLayerRichListService(ConsensusService consensusService)
  • Method Details

    • richList

      public io.reactivex.rxjava3.core.Single<TokenRichList<N,ID>> richList(ID currencyID, int numEntries)
      Asynchronously get a single rich list for a currency TODO: Use ConsensusSnapshot (or equivalent) so we can include blockheight and hash in TokenRichList
      Specified by:
      richList in interface RichListService<N extends Number & Comparable<? super N>,ID>
      Parameters:
      currencyID - The currency ID
      numEntries - The requested number of entries in the list
      Returns:
      A Single that represents an async request for rich list information
    • richListUpdates

      public org.reactivestreams.Publisher<TokenRichList<N,ID>> richListUpdates(ID currencyID, int numEntries)
      Subscribe to ongoing rich list updates (update for each new block) for a currency
      Specified by:
      richListUpdates in interface RichListService<N extends Number & Comparable<? super N>,ID>
      Parameters:
      currencyID - The currency ID
      numEntries - The requested number of entries in each list
      Returns:
      An Observable to subscribe to for a stream of rich list updates
    • smartPlus

      public N smartPlus(N l, N r)