Package foundation.omni.netapi.analytics
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single
<TokenRichList<N, ID>> Asynchronously get a single rich list for a currency TODO: Use ConsensusSnapshot (or equivalent) so we can include blockheight and hash in TokenRichListorg.reactivestreams.Publisher
<TokenRichList<N, ID>> richListUpdates
(ID currencyID, int numEntries) Subscribe to ongoing rich list updates (update for each new block) for a currency
-
Constructor Details
-
OmniLayerRichListService
-
-
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 interfaceRichListService<N extends Number & Comparable<? super N>,
ID> - Parameters:
currencyID
- The currency IDnumEntries
- 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 interfaceRichListService<N extends Number & Comparable<? super N>,
ID> - Parameters:
currencyID
- The currency IDnumEntries
- The requested number of entries in each list- Returns:
- An
Observable
to subscribe to for a stream of rich list updates
-
smartPlus
-