Interface ScheduledCommandCache
- All Known Subinterfaces:
ScheduledCommandCache.StageableScheduledCommandCache,ScheduledCommandCache.StagedScheduledCommandCache
- All Known Implementing Classes:
ScheduledCommandCache.NoopScheduledCommandCache
public interface ScheduledCommandCache
Represents a cache to be used by the
ProcessingScheduleService, which allows it to cache which
commands it has written and avoid writing them again until they've been removed from the cache.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA dummy cache implementation which does nothing, i.e. caches nothing.static interfaceRepresents staged changes to the cache that have not been persisted yet.static interfaceAScheduledCommandCachewhich allows staging changes before persisting them.static interfaceA cache where modifications are staged but not added to the main cache which produced it. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given intent and key pair to the cache.voidclear()Clears the underlying cache of all intent/key pairs.booleanReturns true if the given intent and key pair is already cached.voidRemoves the given intent/key pair from the cache.
-
Method Details
-
add
Add the given intent and key pair to the cache.- Parameters:
intent- intent to cachekey- key to cache
-
contains
Returns true if the given intent and key pair is already cached. -
remove
Removes the given intent/key pair from the cache. -
clear
void clear()Clears the underlying cache of all intent/key pairs.
-