Package com.mewna.catnip.cache
Interface EntityCacheWorker
- All Superinterfaces:
EntityCache
- All Known Implementing Classes:
CustomizableEntityCache
,MemoryEntityCache
,NoopEntityCache
,SplitMemoryEntityCache
,UnifiedMemoryEntityCache
If you plan to write your own implementation of this class, be aware that
the contracts implied by the JSR-305 are *expected* to be followed, and you
*will* break things if you don't follow them.
- Since:
- 9/19/18.
- Author:
- amy
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bulkCacheChannels
(int shardId, Collection<GuildChannel> channels) void
bulkCacheEmoji
(int shardId, Collection<Emoji.CustomEmoji> emoji) void
bulkCacheMembers
(int shardId, Collection<Member> members) void
bulkCachePresences
(int shardId, Map<String, Presence> presences) void
bulkCacheRoles
(int shardId, Collection<Role> roles) void
bulkCacheThreadMembers
(int shardId, Collection<ThreadChannel.ThreadMember> threadMembers) void
bulkCacheUsers
(int shardId, Collection<User> users) void
bulkCacheVoiceStates
(int shardId, Collection<VoiceState> voiceStates) boolean
void
invalidateShard
(int id) io.reactivex.rxjava3.core.Completable
updateCache
(String eventType, int shardId, com.grack.nanojson.JsonObject payload) Update cache with a single gateway event.Methods inherited from interface com.mewna.catnip.cache.EntityCache
channel, channel, channels, channels, channels, emoji, emoji, emojis, emojis, emojis, guild, guild, guilds, member, member, members, members, members, presence, presence, presences, role, role, roles, roles, roles, selfUser, threadMember, threadMember, threadMembers, user, user, users, voiceState, voiceState, voiceStates, voiceStates, voiceStates
-
Method Details
-
updateCache
@Nonnull io.reactivex.rxjava3.core.Completable updateCache(@Nonnull String eventType, @Nonnegative int shardId, @Nonnull com.grack.nanojson.JsonObject payload) Update cache with a single gateway event.- Parameters:
eventType
- Type of the event.payload
- Data payload contained in the event- Returns:
- Itself.
-
bulkCacheUsers
-
bulkCacheChannels
-
bulkCacheRoles
-
bulkCacheMembers
-
bulkCacheEmoji
-
bulkCachePresences
-
bulkCacheVoiceStates
-
bulkCacheThreadMembers
void bulkCacheThreadMembers(@Nonnegative int shardId, @Nonnull Collection<ThreadChannel.ThreadMember> threadMembers) -
invalidateShard
void invalidateShard(@Nonnegative int id) -
catnip
-
canProvidePreviousState
-