Interface EntityCacheWorker

All Superinterfaces:
EntityCache
All Known Implementing Classes:
CustomizableEntityCache, MemoryEntityCache, NoopEntityCache, SplitMemoryEntityCache, UnifiedMemoryEntityCache

public interface EntityCacheWorker extends EntityCache
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
  • 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

      void bulkCacheUsers(@Nonnegative int shardId, @Nonnull Collection<User> users)
    • bulkCacheChannels

      void bulkCacheChannels(@Nonnegative int shardId, @Nonnull Collection<GuildChannel> channels)
    • bulkCacheRoles

      void bulkCacheRoles(@Nonnegative int shardId, @Nonnull Collection<Role> roles)
    • bulkCacheMembers

      void bulkCacheMembers(@Nonnegative int shardId, @Nonnull Collection<Member> members)
    • bulkCacheEmoji

      void bulkCacheEmoji(@Nonnegative int shardId, @Nonnull Collection<Emoji.CustomEmoji> emoji)
    • bulkCachePresences

      void bulkCachePresences(@Nonnegative int shardId, @Nonnull Map<String,Presence> presences)
    • bulkCacheVoiceStates

      void bulkCacheVoiceStates(@Nonnegative int shardId, @Nonnull Collection<VoiceState> voiceStates)
    • bulkCacheThreadMembers

      void bulkCacheThreadMembers(@Nonnegative int shardId, @Nonnull Collection<ThreadChannel.ThreadMember> threadMembers)
    • invalidateShard

      void invalidateShard(@Nonnegative int id)
    • catnip

      @Nonnull EntityCache catnip(@Nonnull Catnip catnip)
    • canProvidePreviousState

      boolean canProvidePreviousState(@Nonnull EntityCacheWorker.CachedEntityState state)