Package discord4j.common.store.impl
Class LocalStoreLayout
java.lang.Object
discord4j.common.store.impl.LocalStoreLayout
- All Implemented Interfaces:
DataAccessor,GatewayDataUpdater,StoreLayout
public class LocalStoreLayout
extends Object
implements StoreLayout, DataAccessor, GatewayDataUpdater
A
StoreLayout that stores entities in the heap of the local JVM. This implementation is entirely thread-safe:
atomicity guarantees are made so that the cache won't be set in an inconsistent state if two events are received
concurrently. However, it is still up to the user to ensure that events are received in the right order.-
Method Summary
Modifier and TypeMethodDescriptionCounts the number of channels present in the store.countChannelsInGuild(long guildId) Counts the number of channels present in the store for the given guild ID.Counts the number of emojis present in the store.countEmojisInGuild(long guildId) Counts the number of emojis present in the store for the given guild ID.countExactMembersInGuild(long guildId) Counts the exact number of members for the given guild ID.Counts the number of guilds present in the store.Counts the number of members present in the store.countMembersInGuild(long guildId) Counts the number of members present in the store for the given guild ID.Counts the number of messages present in the store.countMessagesInChannel(long channelId) Counts the number of messages present in the store for the given channel ID.Counts the number of presences present in the store.countPresencesInGuild(long guildId) Counts the number of presences present in the store for the given guild ID.Counts the number of roles present in the store.countRolesInGuild(long guildId) Counts the number of roles present in the store for the given guild ID.Counts the number of stickers present in the store.countStickersInGuild(long guildId) Counts the number of stickers present in the store for the given guild ID.Counts the number of users present in the store.Counts the number of voice states present in the store.countVoiceStatesInChannel(long guildId, long channelId) Counts the number of voice states present in the store for the given channel ID.countVoiceStatesInGuild(long guildId) Counts the number of voice states present in the store for the given guild ID.static LocalStoreLayoutcreate()static LocalStoreLayoutcreate(StorageConfig config) Mono<discord4j.discordjson.json.ChannelData>getChannelById(long channelId) Retrieves data for the channel corresponding to the given channel ID.Flux<discord4j.discordjson.json.ChannelData>Retrieves data for all channels present in the store.Flux<discord4j.discordjson.json.ChannelData>getChannelsInGuild(long guildId) Retrieves data for all channels present in the store for the given guild ID.Returns aDataAccessorthat defines action handlers for reading data from the store.Mono<discord4j.discordjson.json.EmojiData>getEmojiById(long guildId, long emojiId) Retrieves data for the emoji corresponding to the given guild ID and emoji ID.Flux<discord4j.discordjson.json.EmojiData>Retrieves data for all emojis present in the store.Flux<discord4j.discordjson.json.EmojiData>getEmojisInGuild(long guildId) Retrieves data for all emojis present in the store for the given guild ID.Flux<discord4j.discordjson.json.MemberData>getExactMembersInGuild(long guildId) Retrieves data for all members for the given guild ID.Returns aGatewayDataUpdaterthat defines action handlers for updates received from the Discord gateway.Mono<discord4j.discordjson.json.GuildData>getGuildById(long guildId) Retrieves data for the guild corresponding to the given guild ID.Flux<discord4j.discordjson.json.GuildData>Retrieves data for all guilds present in the store.Mono<discord4j.discordjson.json.MemberData>getMemberById(long guildId, long userId) Retrieves data for the member corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.MemberData>Retrieves data for all members present in the store.Flux<discord4j.discordjson.json.MemberData>getMembersInGuild(long guildId) Retrieves data for all members present in the store for the given guild ID.Flux<discord4j.discordjson.json.ThreadMemberData>getMembersInThread(long threadId) Retrieves data for all thread members present in the store for the given thread ID.Mono<discord4j.discordjson.json.MessageData>getMessageById(long channelId, long messageId) Retrieves data for the message corresponding to the given channel ID and message ID.Flux<discord4j.discordjson.json.MessageData>Retrieves data for all messages present in the store.Flux<discord4j.discordjson.json.MessageData>getMessagesInChannel(long channelId) Retrieves data for all messages present in the store for the given channel ID.Mono<discord4j.discordjson.json.PresenceData>getPresenceById(long guildId, long userId) Retrieves data for the presence corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.PresenceData>Retrieves data for all presences present in the store.Flux<discord4j.discordjson.json.PresenceData>getPresencesInGuild(long guildId) Retrieves data for all presences present in the store for the given guild ID.Mono<discord4j.discordjson.json.RoleData>getRoleById(long guildId, long roleId) Retrieves data for the role corresponding to the given guild ID and role ID.Flux<discord4j.discordjson.json.RoleData>getRoles()Retrieves data for all roles present in the store.Flux<discord4j.discordjson.json.RoleData>getRolesInGuild(long guildId) Retrieves data for all roles present in the store for the given guild ID.Mono<discord4j.discordjson.json.GuildScheduledEventData>getScheduledEventById(long guildId, long eventId) Retrieves data for the guild scheduled event corresponding to the given guild ID and event ID.Flux<discord4j.discordjson.json.GuildScheduledEventData>getScheduledEventsInGuild(long guildId) Retrieves data for all guild scheduled events corresponding to the given guild ID.Flux<discord4j.discordjson.Id>getScheduledEventUsersInEvent(long guildId, long eventId) Retrieves data for all guild scheduled event users corresponding to the given guild ID and event ID.Mono<discord4j.discordjson.json.StageInstanceData>getStageInstanceByChannelId(long channelId) Retrieves data for the stage instance corresponding to the given channel ID.Mono<discord4j.discordjson.json.StickerData>getStickerById(long guildId, long stickerId) Retrieves data for the sticker corresponding to the given guild ID and sticker ID.Flux<discord4j.discordjson.json.StickerData>Retrieves data for all stickers present in the store.Flux<discord4j.discordjson.json.StickerData>getStickersInGuild(long guildId) Retrieves data for all stickers present in the store for the given guild ID.Mono<discord4j.discordjson.json.ThreadMemberData>getThreadMemberById(long threadId, long userId) Retrieves data for the thread member corresponding to the given thread ID and user ID.Mono<discord4j.discordjson.json.UserData>getUserById(long userId) Retrieves data for the user corresponding to the given user ID.Flux<discord4j.discordjson.json.UserData>getUsers()Retrieves data for all users present in the store.Mono<discord4j.discordjson.json.VoiceStateData>getVoiceStateById(long guildId, long userId) Retrieves data for the voice state corresponding to the given guild ID and user ID.Flux<discord4j.discordjson.json.VoiceStateData>Retrieves data for all voice states present in the store.Flux<discord4j.discordjson.json.VoiceStateData>getVoiceStatesInChannel(long guildId, long channelId) Retrieves data for all voice states present in the store for the given guild ID and channel ID.Flux<discord4j.discordjson.json.VoiceStateData>getVoiceStatesInGuild(long guildId) Retrieves data for all voice states present in the store for the given guild ID.onChannelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Updates the internal state of the store according to the givenChannelCreategateway dispatch.Mono<discord4j.discordjson.json.ChannelData>onChannelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Updates the internal state of the store according to the givenChannelDeletegateway dispatch.Mono<discord4j.discordjson.json.ChannelData>onChannelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Updates the internal state of the store according to the givenChannelUpdategateway dispatch.onGuildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Updates the internal state of the store according to the givenGuildCreategateway dispatch.Mono<discord4j.discordjson.json.GuildData>onGuildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Updates the internal state of the store according to the givenGuildDeletegateway dispatch.onGuildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Updates the internal state of the store according to the givenGuildEmojisUpdategateway dispatch.onGuildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Updates the internal state of the store according to the givenGuildMemberAddgateway dispatch.Mono<discord4j.discordjson.json.MemberData>onGuildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Updates the internal state of the store according to the givenGuildMemberRemovegateway dispatch.onGuildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Updates the internal state of the store according to the givenGuildMembersChunkgateway dispatch.onGuildMembersCompletion(long guildId) Invoked to indicate that all members for the specified guild ID were received.Mono<discord4j.discordjson.json.MemberData>onGuildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Updates the internal state of the store according to the givenGuildMemberUpdategateway dispatch.onGuildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Updates the internal state of the store according to the givenGuildRoleCreategateway dispatch.Mono<discord4j.discordjson.json.RoleData>onGuildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Updates the internal state of the store according to the givenGuildRoleDeletegateway dispatch.Mono<discord4j.discordjson.json.RoleData>onGuildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Updates the internal state of the store according to the givenGuildRoleUpdategateway dispatch.onGuildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Updates the internal state of the store according to theGuildScheduledEventCreategateway dispatch.Mono<discord4j.discordjson.json.GuildScheduledEventData>onGuildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Updates the internal state of the store according to theGuildScheduledEventDeletegateway dispatch.Mono<discord4j.discordjson.json.GuildScheduledEventData>onGuildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Updates the internal state of the store according to theGuildScheduledEventUpdategateway dispatch.onGuildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Updates the internal state of the store according to theGuildScheduledEventUserAddgateway dispatch.onGuildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Updates the internal state of the store according to theGuildScheduledEventUserRemovegateway dispatch.onGuildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Updates the internal state of the store according to the givenGuildStickersUpdategateway dispatch.Mono<discord4j.discordjson.json.GuildData>onGuildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Updates the internal state of the store according to the givenGuildUpdategateway dispatch.onMessageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Updates the internal state of the store according to the givenMessageCreategateway dispatch.Mono<discord4j.discordjson.json.MessageData>onMessageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Updates the internal state of the store according to the givenMessageDeletegateway dispatch.onMessageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Updates the internal state of the store according to the givenMessageDeleteBulkgateway dispatch.onMessageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Updates the internal state of the store according to the givenMessageReactionAddgateway dispatch.onMessageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Updates the internal state of the store according to the givenMessageReactionRemovegateway dispatch.onMessageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveAllgateway dispatch.onMessageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Updates the internal state of the store according to the givenMessageReactionRemoveEmojigateway dispatch.Mono<discord4j.discordjson.json.MessageData>onMessageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Updates the internal state of the store according to the givenMessageUpdategateway dispatch.onPresenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Updates the internal state of the store according to the givenPresenceUpdategateway dispatch.onReady(discord4j.discordjson.json.gateway.Ready dispatch) Updates the internal state of the store according to the givenReadygateway dispatch.onShardInvalidation(int shardIndex, InvalidationCause cause) Handles the invalidation of a specific shard.onStageInstanceCreate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceCreate dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch.Mono<discord4j.discordjson.json.StageInstanceData>onStageInstanceDelete(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceDelete dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch.Mono<discord4j.discordjson.json.StageInstanceData>onStageInstanceUpdate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceUpdate dispatch) Updates the internal state of the store according to the givenStageInstanceCreategateway dispatch.onThreadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Updates the internal state of the store according to the givenThreadCreategateway dispatch.onThreadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Updates the internal state of the store according to the givenThreadDeletegateway dispatch.onThreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Updates the internal state of the store according to the givenThreadListSyncgateway dispatch.onThreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Updates the internal state of the store according to the givenThreadMembersUpdategateway dispatch.Mono<discord4j.discordjson.json.ThreadMemberData>onThreadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Updates the internal state of the store according to the givenThreadMemberUpdategateway dispatch.Mono<discord4j.discordjson.json.ChannelData>onThreadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Updates the internal state of the store according to the givenThreadUpdategateway dispatch.Mono<discord4j.discordjson.json.UserData>onUserUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Updates the internal state of the store according to the givenUserUpdategateway dispatch.Mono<discord4j.discordjson.json.VoiceStateData>onVoiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Updates the internal state of the store according to the givenVoiceStateUpdateDispatchgateway dispatch.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface discord4j.common.store.api.layout.StoreLayout
getCustomActionMapper, getEnabledFlags
-
Method Details
-
create
-
create
-
countChannels
Description copied from interface:DataAccessorCounts the number of channels present in the store.- Specified by:
countChannelsin interfaceDataAccessor- Returns:
- A
Monoemitting the channel count
-
countChannelsInGuild
Description copied from interface:DataAccessorCounts the number of channels present in the store for the given guild ID.- Specified by:
countChannelsInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the channel count
-
countStickers
Description copied from interface:DataAccessorCounts the number of stickers present in the store.- Specified by:
countStickersin interfaceDataAccessor- Returns:
- A
Monoemitting the sticker count
-
countStickersInGuild
Description copied from interface:DataAccessorCounts the number of stickers present in the store for the given guild ID.- Specified by:
countStickersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the sticker count
-
countEmojis
Description copied from interface:DataAccessorCounts the number of emojis present in the store.- Specified by:
countEmojisin interfaceDataAccessor- Returns:
- A
Monoemitting the emoji count
-
countEmojisInGuild
Description copied from interface:DataAccessorCounts the number of emojis present in the store for the given guild ID.- Specified by:
countEmojisInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the emoji count
-
countGuilds
Description copied from interface:DataAccessorCounts the number of guilds present in the store.- Specified by:
countGuildsin interfaceDataAccessor- Returns:
- A
Monoemitting the guild count
-
countMembers
Description copied from interface:DataAccessorCounts the number of members present in the store.- Specified by:
countMembersin interfaceDataAccessor- Returns:
- A
Monoemitting the member count
-
countMembersInGuild
Description copied from interface:DataAccessorCounts the number of members present in the store for the given guild ID.- Specified by:
countMembersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the member count
-
countExactMembersInGuild
Description copied from interface:DataAccessorCounts the exact number of members for the given guild ID. If some members are not present in the store and thus is not able to return an accurate count, it will error withExactResultNotAvailableException.- Specified by:
countExactMembersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the member count
-
countMessages
Description copied from interface:DataAccessorCounts the number of messages present in the store.- Specified by:
countMessagesin interfaceDataAccessor- Returns:
- A
Monoemitting the message count
-
countMessagesInChannel
Description copied from interface:DataAccessorCounts the number of messages present in the store for the given channel ID.- Specified by:
countMessagesInChannelin interfaceDataAccessor- Parameters:
channelId- the channel ID- Returns:
- A
Monoemitting the message count
-
countPresences
Description copied from interface:DataAccessorCounts the number of presences present in the store.- Specified by:
countPresencesin interfaceDataAccessor- Returns:
- A
Monoemitting the presence count
-
countPresencesInGuild
Description copied from interface:DataAccessorCounts the number of presences present in the store for the given guild ID.- Specified by:
countPresencesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the presence count
-
countRoles
Description copied from interface:DataAccessorCounts the number of roles present in the store.- Specified by:
countRolesin interfaceDataAccessor- Returns:
- A
Monoemitting the role count
-
countRolesInGuild
Description copied from interface:DataAccessorCounts the number of roles present in the store for the given guild ID.- Specified by:
countRolesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the role count
-
countUsers
Description copied from interface:DataAccessorCounts the number of users present in the store.- Specified by:
countUsersin interfaceDataAccessor- Returns:
- A
Monoemitting the user count
-
countVoiceStates
Description copied from interface:DataAccessorCounts the number of voice states present in the store.- Specified by:
countVoiceStatesin interfaceDataAccessor- Returns:
- A
Monoemitting the voice state count
-
countVoiceStatesInGuild
Description copied from interface:DataAccessorCounts the number of voice states present in the store for the given guild ID.- Specified by:
countVoiceStatesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the voice state count
-
countVoiceStatesInChannel
Description copied from interface:DataAccessorCounts the number of voice states present in the store for the given channel ID.- Specified by:
countVoiceStatesInChannelin interfaceDataAccessor- Parameters:
guildId- the guild IDchannelId- the channel ID- Returns:
- A
Monoemitting the voice state count
-
getChannels
Description copied from interface:DataAccessorRetrieves data for all channels present in the store.- Specified by:
getChannelsin interfaceDataAccessor- Returns:
- A
Fluxemitting the channels, or empty if none is present
-
getChannelsInGuild
Description copied from interface:DataAccessorRetrieves data for all channels present in the store for the given guild ID.- Specified by:
getChannelsInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the channels, or empty if none is present
-
getChannelById
Description copied from interface:DataAccessorRetrieves data for the channel corresponding to the given channel ID.- Specified by:
getChannelByIdin interfaceDataAccessor- Parameters:
channelId- the channel ID- Returns:
- A
Monoemitting the channel, or empty if not found
-
getStickers
Description copied from interface:DataAccessorRetrieves data for all stickers present in the store.- Specified by:
getStickersin interfaceDataAccessor- Returns:
- A
Fluxemitting the stickers, or empty if none is present
-
getStickersInGuild
Description copied from interface:DataAccessorRetrieves data for all stickers present in the store for the given guild ID.- Specified by:
getStickersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the stickers, or empty if none is present
-
getStickerById
Description copied from interface:DataAccessorRetrieves data for the sticker corresponding to the given guild ID and sticker ID.- Specified by:
getStickerByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDstickerId- the sticker ID- Returns:
- A
Monoemitting the sticker, or empty if not found
-
getEmojis
Description copied from interface:DataAccessorRetrieves data for all emojis present in the store.- Specified by:
getEmojisin interfaceDataAccessor- Returns:
- A
Fluxemitting the emojis, or empty if none is present
-
getEmojisInGuild
Description copied from interface:DataAccessorRetrieves data for all emojis present in the store for the given guild ID.- Specified by:
getEmojisInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the emojis, or empty if none is present
-
getEmojiById
Description copied from interface:DataAccessorRetrieves data for the emoji corresponding to the given guild ID and emoji ID.- Specified by:
getEmojiByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDemojiId- the emoji ID- Returns:
- A
Monoemitting the emoji, or empty if not found
-
getGuilds
Description copied from interface:DataAccessorRetrieves data for all guilds present in the store.- Specified by:
getGuildsin interfaceDataAccessor- Returns:
- A
Fluxemitting the guilds, or empty if none is present
-
getGuildById
Description copied from interface:DataAccessorRetrieves data for the guild corresponding to the given guild ID.- Specified by:
getGuildByIdin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Monoemitting the guild, or empty if not found
-
getScheduledEventsInGuild
public Flux<discord4j.discordjson.json.GuildScheduledEventData> getScheduledEventsInGuild(long guildId) Description copied from interface:DataAccessorRetrieves data for all guild scheduled events corresponding to the given guild ID.- Specified by:
getScheduledEventsInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the scheduled events, or empty if none is present
-
getScheduledEventById
public Mono<discord4j.discordjson.json.GuildScheduledEventData> getScheduledEventById(long guildId, long eventId) Description copied from interface:DataAccessorRetrieves data for the guild scheduled event corresponding to the given guild ID and event ID.- Specified by:
getScheduledEventByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDeventId- the event ID- Returns:
- A
Monoemitting the scheduled event, or empty if not found
-
getScheduledEventUsersInEvent
Description copied from interface:DataAccessorRetrieves data for all guild scheduled event users corresponding to the given guild ID and event ID.- Specified by:
getScheduledEventUsersInEventin interfaceDataAccessor- Parameters:
guildId- the guild IDeventId- the event ID- Returns:
- A
Fluxemitting the scheduled event users ids, or empty if none is present
-
getMembers
Description copied from interface:DataAccessorRetrieves data for all members present in the store.- Specified by:
getMembersin interfaceDataAccessor- Returns:
- A
Fluxemitting the members, or empty if none is present
-
getMembersInGuild
Description copied from interface:DataAccessorRetrieves data for all members present in the store for the given guild ID.- Specified by:
getMembersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the members, or empty if none is present
-
getExactMembersInGuild
Description copied from interface:DataAccessorRetrieves data for all members for the given guild ID. If some members are not present in the store and thus is not able to return the full member list of the guild, it will error withExactResultNotAvailableException.- Specified by:
getExactMembersInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the members, orExactResultNotAvailableExceptionif not all are present
-
getMemberById
Description copied from interface:DataAccessorRetrieves data for the member corresponding to the given guild ID and user ID.- Specified by:
getMemberByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDuserId- the user ID- Returns:
- A
Monoemitting the member, or empty if not found
-
getMessages
Description copied from interface:DataAccessorRetrieves data for all messages present in the store.- Specified by:
getMessagesin interfaceDataAccessor- Returns:
- A
Fluxemitting the messages, or empty if none is present
-
getMessagesInChannel
Description copied from interface:DataAccessorRetrieves data for all messages present in the store for the given channel ID.- Specified by:
getMessagesInChannelin interfaceDataAccessor- Parameters:
channelId- the channel ID- Returns:
- A
Fluxemitting the messages, or empty if none is present
-
getMessageById
Description copied from interface:DataAccessorRetrieves data for the message corresponding to the given channel ID and message ID.- Specified by:
getMessageByIdin interfaceDataAccessor- Parameters:
channelId- the channel IDmessageId- the message ID- Returns:
- A
Monoemitting the message, or empty if not found
-
getPresences
Description copied from interface:DataAccessorRetrieves data for all presences present in the store.- Specified by:
getPresencesin interfaceDataAccessor- Returns:
- A
Fluxemitting the presences, or empty if none is present
-
getPresencesInGuild
Description copied from interface:DataAccessorRetrieves data for all presences present in the store for the given guild ID.- Specified by:
getPresencesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the presences, or empty if none is present
-
getPresenceById
Description copied from interface:DataAccessorRetrieves data for the presence corresponding to the given guild ID and user ID.- Specified by:
getPresenceByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDuserId- the user ID- Returns:
- A
Monoemitting the presence, or empty if not found
-
getRoles
Description copied from interface:DataAccessorRetrieves data for all roles present in the store.- Specified by:
getRolesin interfaceDataAccessor- Returns:
- A
Fluxemitting the roles, or empty if none is present
-
getRolesInGuild
Description copied from interface:DataAccessorRetrieves data for all roles present in the store for the given guild ID.- Specified by:
getRolesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the roles, or empty if none is present
-
getRoleById
Description copied from interface:DataAccessorRetrieves data for the role corresponding to the given guild ID and role ID.- Specified by:
getRoleByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDroleId- the role ID- Returns:
- A
Monoemitting the role, or empty if not found
-
getUsers
Description copied from interface:DataAccessorRetrieves data for all users present in the store.- Specified by:
getUsersin interfaceDataAccessor- Returns:
- A
Fluxemitting the users, or empty if none is present
-
getUserById
Description copied from interface:DataAccessorRetrieves data for the user corresponding to the given user ID.- Specified by:
getUserByIdin interfaceDataAccessor- Parameters:
userId- the user ID- Returns:
- A
Monoemitting the user, or empty if not found
-
getVoiceStates
Description copied from interface:DataAccessorRetrieves data for all voice states present in the store.- Specified by:
getVoiceStatesin interfaceDataAccessor- Returns:
- A
Fluxemitting the voice states, or empty if none is present
-
getVoiceStatesInChannel
public Flux<discord4j.discordjson.json.VoiceStateData> getVoiceStatesInChannel(long guildId, long channelId) Description copied from interface:DataAccessorRetrieves data for all voice states present in the store for the given guild ID and channel ID.- Specified by:
getVoiceStatesInChannelin interfaceDataAccessor- Parameters:
guildId- the guild IDchannelId- the channel ID- Returns:
- A
Fluxemitting the voice states, or empty if none is present
-
getVoiceStatesInGuild
Description copied from interface:DataAccessorRetrieves data for all voice states present in the store for the given guild ID.- Specified by:
getVoiceStatesInGuildin interfaceDataAccessor- Parameters:
guildId- the guild ID- Returns:
- A
Fluxemitting the voice states, or empty if none is present
-
getVoiceStateById
Description copied from interface:DataAccessorRetrieves data for the voice state corresponding to the given guild ID and user ID.- Specified by:
getVoiceStateByIdin interfaceDataAccessor- Parameters:
guildId- the guild IDuserId- the user ID- Returns:
- A
Monoemitting the voice state, or empty if not found
-
onChannelCreate
public Mono<Void> onChannelCreate(int shardIndex, discord4j.discordjson.json.gateway.ChannelCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenChannelCreategateway dispatch. This will typically perform an insert operation on the relatedChannelData, and add the ID to the list returned byGuildData.channels()if applicable.- Specified by:
onChannelCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onChannelDelete
public Mono<discord4j.discordjson.json.ChannelData> onChannelDelete(int shardIndex, discord4j.discordjson.json.gateway.ChannelDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenChannelDeletegateway dispatch. This will typically perform a delete operation on a relatedChannelDatathat is already present in the store, and remove the ID from the list returned byGuildData.channels()if applicable.- Specified by:
onChannelDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the deletion
-
onChannelUpdate
public Mono<discord4j.discordjson.json.ChannelData> onChannelUpdate(int shardIndex, discord4j.discordjson.json.gateway.ChannelUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenChannelUpdategateway dispatch. This will typically perform an update operation on a relatedChannelDatathat is already present in the store.- Specified by:
onChannelUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the update
-
onGuildCreate
public Mono<Void> onGuildCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildCreategateway dispatch. This will typically perform an insert operation on the relatedGuildData, as well as all associated entities received in the payload, such as channels, roles, emojis, members, voice states and presences.- Specified by:
onGuildCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildDelete
public Mono<discord4j.discordjson.json.GuildData> onGuildDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildDeletegateway dispatch. This will typically perform a delete operation on a relatedGuildDatathat is already present in the store, and clean up all entities that are associated to that guild, such as the channels, the roles, the emojis, the members, the voice states and the messages.- Specified by:
onGuildDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theGuildDatabefore the deletion
-
onGuildStickersUpdate
public Mono<Set<discord4j.discordjson.json.StickerData>> onGuildStickersUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildStickersUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildStickersUpdategateway dispatch. This will typically perform an update operation on a related collection ofStickerDatathat is already present in the store, and update the list returned byGuildData.stickers().- Specified by:
onGuildStickersUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofStickerDatabefore the update
-
onGuildEmojisUpdate
public Mono<Set<discord4j.discordjson.json.EmojiData>> onGuildEmojisUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildEmojisUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildEmojisUpdategateway dispatch. This will typically perform an update operation on a related collection ofEmojiDatathat is already present in the store, and update the list returned byGuildData.emojis().- Specified by:
onGuildEmojisUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofEmojiDatabefore the update
-
onGuildMemberAdd
public Mono<Void> onGuildMemberAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberAdd dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildMemberAddgateway dispatch. This will typically perform an insert operation on the relatedMemberData, add the ID of the member into the list returned byGuildData.members(), and increment the count returned byGuildCreateFields.memberCount().- Specified by:
onGuildMemberAddin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildMemberRemove
public Mono<discord4j.discordjson.json.MemberData> onGuildMemberRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberRemove dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildMemberRemovegateway dispatch. This will typically perform a delete operation on the relatedMemberData, remove the ID of the member from the list returned byGuildData.members(), and decrement the count returned byGuildCreateFields.memberCount().- Specified by:
onGuildMemberRemovein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMemberDatabefore the deletion
-
onGuildMembersChunk
public Mono<Void> onGuildMembersChunk(int shardIndex, discord4j.discordjson.json.gateway.GuildMembersChunk dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildMembersChunkgateway dispatch. This will typically perform the same kind of operations thanGatewayDataUpdater.onGuildMemberAdd(int, GuildMemberAdd), but adapted for whole chunks of members.- Specified by:
onGuildMembersChunkin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildMemberUpdate
public Mono<discord4j.discordjson.json.MemberData> onGuildMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildMemberUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildMemberUpdategateway dispatch. This will typically perform an update operation on a relatedMemberDatathat is already present in the store.- Specified by:
onGuildMemberUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMemberDatabefore the update
-
onGuildRoleCreate
public Mono<Void> onGuildRoleCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildRoleCreategateway dispatch. This will typically perform an insert operation on the relatedRoleData, and add the role ID to the list returned byGuildData.roles().- Specified by:
onGuildRoleCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildRoleDelete
public Mono<discord4j.discordjson.json.RoleData> onGuildRoleDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildRoleDeletegateway dispatch. This will typically perform a delete operation on a relatedRoleDatathat is already present in the store, and remove the role ID from the list returned byGuildData.roles()andPartialMemberData.roles().- Specified by:
onGuildRoleDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theRoleDatabefore the deletion
-
onGuildRoleUpdate
public Mono<discord4j.discordjson.json.RoleData> onGuildRoleUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildRoleUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildRoleUpdategateway dispatch. This will typically perform an update operation on a relatedRoleDatathat is already present in the store.- Specified by:
onGuildRoleUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theRoleDatabefore the update
-
onGuildScheduledEventCreate
public Mono<Void> onGuildScheduledEventCreate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to theGuildScheduledEventCreategateway dispatch. This will typically perform an insert operation on a newGuildScheduledEventDatain the store.- Specified by:
onGuildScheduledEventCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildScheduledEventUpdate
public Mono<discord4j.discordjson.json.GuildScheduledEventData> onGuildScheduledEventUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to theGuildScheduledEventUpdategateway dispatch. This will typically perform an update operation on a relatedGuildScheduledEventDataalready present in the store.- Specified by:
onGuildScheduledEventUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returningGuildScheduledEventDatain a state before the update
-
onGuildScheduledEventDelete
public Mono<discord4j.discordjson.json.GuildScheduledEventData> onGuildScheduledEventDelete(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to theGuildScheduledEventDeletegateway dispatch. This will typically perform a delete operation on a relatedGuildScheduledEventDatain the store, if present.- Specified by:
onGuildScheduledEventDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning theGuildScheduledEventDatain a state before the deletion.
-
onGuildScheduledEventUserAdd
public Mono<Void> onGuildScheduledEventUserAdd(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserAdd dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to theGuildScheduledEventUserAddgateway dispatch. This will typically perform an insert operation on a relatedListhandling a relationship between aGuildScheduledEventDataand the providedGuildScheduledEventUserData.- Specified by:
onGuildScheduledEventUserAddin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildScheduledEventUserRemove
public Mono<Void> onGuildScheduledEventUserRemove(int shardIndex, discord4j.discordjson.json.gateway.GuildScheduledEventUserRemove dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to theGuildScheduledEventUserRemovegateway dispatch. This will typically perform a delete operation on a relatedListhandling a relationship between aGuildScheduledEventDataand the providedGuildScheduledEventUserData.- Specified by:
onGuildScheduledEventUserRemovein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onGuildUpdate
public Mono<discord4j.discordjson.json.GuildData> onGuildUpdate(int shardIndex, discord4j.discordjson.json.gateway.GuildUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenGuildUpdategateway dispatch. This will typically perform an update operation on a relatedGuildDatathat is already present in the store.- Specified by:
onGuildUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theGuildDatabefore the update
-
onShardInvalidation
Description copied from interface:GatewayDataUpdaterHandles the invalidation of a specific shard. When a shard is invalidated, all cached data related to it should be considered stale and the implementation may perform some cleanup work.- Specified by:
onShardInvalidationin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard to invalidatecause- the cause of the invalidation- Returns:
- a
Monocompleting when the operation is done
-
onMessageCreate
public Mono<Void> onMessageCreate(int shardIndex, discord4j.discordjson.json.gateway.MessageCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageCreategateway dispatch. This will typically perform an insert operation on the relatedMessageData, and update thelast_message_idfield of the channel where the message was sent in.- Specified by:
onMessageCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageDelete
public Mono<discord4j.discordjson.json.MessageData> onMessageDelete(int shardIndex, discord4j.discordjson.json.gateway.MessageDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageDeletegateway dispatch. This will typically perform a delete operation on a relatedMessageDatathat is already present in the store.- Specified by:
onMessageDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMessageDatabefore the deletion
-
onMessageDeleteBulk
public Mono<Set<discord4j.discordjson.json.MessageData>> onMessageDeleteBulk(int shardIndex, discord4j.discordjson.json.gateway.MessageDeleteBulk dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageDeleteBulkgateway dispatch. This will typically perform a delete operation on a related collection ofMessageDatathat is already present in the store.- Specified by:
onMessageDeleteBulkin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the set ofMessageDatabefore the deletion
-
onMessageReactionAdd
public Mono<Void> onMessageReactionAdd(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionAdd dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageReactionAddgateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to add the reaction.- Specified by:
onMessageReactionAddin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemove
public Mono<Void> onMessageReactionRemove(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemove dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageReactionRemovegateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove the reaction.- Specified by:
onMessageReactionRemovein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemoveAll
public Mono<Void> onMessageReactionRemoveAll(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveAll dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageReactionRemoveAllgateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove all reactions.- Specified by:
onMessageReactionRemoveAllin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageReactionRemoveEmoji
public Mono<Void> onMessageReactionRemoveEmoji(int shardIndex, discord4j.discordjson.json.gateway.MessageReactionRemoveEmoji dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageReactionRemoveEmojigateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store in order to remove all reactions for a specific emoji.- Specified by:
onMessageReactionRemoveEmojiin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onMessageUpdate
public Mono<discord4j.discordjson.json.MessageData> onMessageUpdate(int shardIndex, discord4j.discordjson.json.gateway.MessageUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenMessageUpdategateway dispatch. This will typically perform an update operation on a relatedMessageDatathat is already present in the store.- Specified by:
onMessageUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theMessageDatabefore the update
-
onPresenceUpdate
public Mono<PresenceAndUserData> onPresenceUpdate(int shardIndex, discord4j.discordjson.json.gateway.PresenceUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenPresenceUpdategateway dispatch. This will typically perform an insert or an update operation on the relatedPresenceData, and update the relatedUserDatato reflect the new presence.- Specified by:
onPresenceUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of both thePresenceDataand theUserDatabefore the update
-
onReady
Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenReadygateway dispatch. This will typically perform an insert operation on theUserDatathat represents the self-user, and allocate the resources needed to receive further events happening on this shard index.- Specified by:
onReadyin interfaceGatewayDataUpdater- Parameters:
dispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onStageInstanceCreate
public Mono<Void> onStageInstanceCreate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an insert operation on the relatedStageInstanceData.- Specified by:
onStageInstanceCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onStageInstanceUpdate
public Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceUpdate(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an insert operation on the relatedStageInstanceDatathat is already present in the store.- Specified by:
onStageInstanceUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, returning the old state of theStageInstanceDatabefore the update
-
onStageInstanceDelete
public Mono<discord4j.discordjson.json.StageInstanceData> onStageInstanceDelete(int shardIndex, discord4j.discordjson.json.gateway.StageInstanceDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenStageInstanceCreategateway dispatch. This will typically perform an delete operation on the relatedStageInstanceDatathat is already present in the store.- Specified by:
onStageInstanceDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, returning the old state of theStageInstanceDatabefore the delete
-
getStageInstanceByChannelId
public Mono<discord4j.discordjson.json.StageInstanceData> getStageInstanceByChannelId(long channelId) Description copied from interface:DataAccessorRetrieves data for the stage instance corresponding to the given channel ID.- Specified by:
getStageInstanceByChannelIdin interfaceDataAccessor- Parameters:
channelId- the channel ID- Returns:
- A
Monoemitting the stage instance data, or empty if not found
-
getThreadMemberById
public Mono<discord4j.discordjson.json.ThreadMemberData> getThreadMemberById(long threadId, long userId) Description copied from interface:DataAccessorRetrieves data for the thread member corresponding to the given thread ID and user ID.- Specified by:
getThreadMemberByIdin interfaceDataAccessor- Parameters:
threadId- the thread IDuserId- the user ID- Returns:
- A
Monoemitting the thread member data, or empty if not found
-
getMembersInThread
Description copied from interface:DataAccessorRetrieves data for all thread members present in the store for the given thread ID.- Specified by:
getMembersInThreadin interfaceDataAccessor- Parameters:
threadId- the thread ID- Returns:
- A
Fluxemitting the thread members, or empty if none is present
-
onUserUpdate
public Mono<discord4j.discordjson.json.UserData> onUserUpdate(int shardIndex, discord4j.discordjson.json.gateway.UserUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenUserUpdategateway dispatch. This will typically perform an update operation on a relatedUserDatathat is already present in the store.- Specified by:
onUserUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theUserDatabefore the update
-
onVoiceStateUpdateDispatch
public Mono<discord4j.discordjson.json.VoiceStateData> onVoiceStateUpdateDispatch(int shardIndex, discord4j.discordjson.json.gateway.VoiceStateUpdateDispatch dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenVoiceStateUpdateDispatchgateway dispatch. This will typically perform an insert, update or delete operation on the relatedVoiceStateData.- Specified by:
onVoiceStateUpdateDispatchin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theVoiceStateDatabefore the update
-
onGuildMembersCompletion
Description copied from interface:GatewayDataUpdaterInvoked to indicate that all members for the specified guild ID were received. It serves as a hint to indicate to the store that information on the full member list for this specific guild may now be accurately returned, so that further calls toDataAccessor.countExactMembersInGuild(long)andDataAccessor.getExactMembersInGuild(long)with the same guild ID no longer fail.- Specified by:
onGuildMembersCompletionin interfaceGatewayDataUpdater- Parameters:
guildId- the guild ID- Returns:
- a
Monocompleting when the operation is done
-
onThreadCreate
public Mono<Void> onThreadCreate(int shardIndex, discord4j.discordjson.json.gateway.ThreadCreate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadCreategateway dispatch. This will typically perform an insert operation on the relatedChannelData.- Specified by:
onThreadCreatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadUpdate
public Mono<discord4j.discordjson.json.ChannelData> onThreadUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadUpdategateway dispatch. This will typically perform an update operation on a relatedChannelDatathat is already present in the store.- Specified by:
onThreadUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theChannelDatabefore the update
-
onThreadDelete
public Mono<Void> onThreadDelete(int shardIndex, discord4j.discordjson.json.gateway.ThreadDelete dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadDeletegateway dispatch. This will typically perform a delete operation on a relatedChannelDatathat is already present in the store.- Specified by:
onThreadDeletein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadListSync
public Mono<Void> onThreadListSync(int shardIndex, discord4j.discordjson.json.gateway.ThreadListSync dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadListSyncgateway dispatch. This will typically perform an update and delete operation on the relatedChannelDataandThreadMemberData.- Specified by:
onThreadListSyncin interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done
-
onThreadMemberUpdate
public Mono<discord4j.discordjson.json.ThreadMemberData> onThreadMemberUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMemberUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadMemberUpdategateway dispatch. This will typically perform a delete operation on a relatedThreadMemberDatathat is already present in the store.- Specified by:
onThreadMemberUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of theThreadMemberUpdatebefore the deletion
-
onThreadMembersUpdate
public Mono<List<discord4j.discordjson.json.ThreadMemberData>> onThreadMembersUpdate(int shardIndex, discord4j.discordjson.json.gateway.ThreadMembersUpdate dispatch) Description copied from interface:GatewayDataUpdaterUpdates the internal state of the store according to the givenThreadMembersUpdategateway dispatch. This will typically perform a delete operation on a relatedThreadMemberDatathat is already present in the store.- Specified by:
onThreadMembersUpdatein interfaceGatewayDataUpdater- Parameters:
shardIndex- the index of the shard where the dispatch comes fromdispatch- the dispatch data coming from Discord gateway- Returns:
- a
Monocompleting when the operation is done, optionally returning the old state of the list ofThreadMemberDatabefore the deletion
-
getDataAccessor
Description copied from interface:StoreLayoutReturns aDataAccessorthat defines action handlers for reading data from the store.- Specified by:
getDataAccessorin interfaceStoreLayout- Returns:
- a
DataAccessor
-
getGatewayDataUpdater
Description copied from interface:StoreLayoutReturns aGatewayDataUpdaterthat defines action handlers for updates received from the Discord gateway.- Specified by:
getGatewayDataUpdaterin interfaceStoreLayout- Returns:
- a
GatewayDataUpdater
-