@FunctionalInterface public interface EntityRetrievalStrategy extends Function<GatewayDiscordClient,EntityRetriever>
GatewayDiscordClient
.
This class pre-defines some factories according to its main modes of operations:
STORE
to exclusively fetch data from the state cache.REST
to fetch data directly from the REST API.STORE_FALLBACK_REST
to attempt fetching from the state cache, and if not
successful, fetch from REST. This the default mode.Modifier and Type | Field and Description |
---|---|
static EntityRetrievalStrategy |
REST
Strategy that consists of retrieving entities from REST API.
|
static EntityRetrievalStrategy |
STORE
Strategy that consists of retrieving entities from stores.
|
static EntityRetrievalStrategy |
STORE_FALLBACK_REST
Strategy that consists of retrieving entities from stores first, then hit the REST API if not found.
|
static final EntityRetrievalStrategy STORE
Mono.switchIfEmpty(Mono)
.static final EntityRetrievalStrategy REST
static final EntityRetrievalStrategy STORE_FALLBACK_REST