Class InMemoryBootstrapStateStore
java.lang.Object
com.svenruppert.jsentinel.bootstrap.InMemoryBootstrapStateStore
- All Implemented Interfaces:
BootstrapStateStore
@ExperimentalJSentinelApi
public final class InMemoryBootstrapStateStore
extends Object
implements BootstrapStateStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanRemoves the recorded state fortenant.Returns the recorded bootstrap state fortenant.voidsave(BootstrapState state) Persists or replaces the bootstrap state.
-
Constructor Details
-
InMemoryBootstrapStateStore
public InMemoryBootstrapStateStore()Creates an empty store.
-
-
Method Details
-
find
Description copied from interface:BootstrapStateStoreReturns the recorded bootstrap state fortenant.- Specified by:
findin interfaceBootstrapStateStore- Parameters:
tenant- tenant scope; must not benull- Returns:
- state, if recorded
-
save
Description copied from interface:BootstrapStateStorePersists or replaces the bootstrap state. Keyed onBootstrapState.tenant().- Specified by:
savein interfaceBootstrapStateStore- Parameters:
state- state to save; must not benull
-
delete
Description copied from interface:BootstrapStateStoreRemoves the recorded state fortenant.- Specified by:
deletein interfaceBootstrapStateStore- Parameters:
tenant- tenant scope; must not benull- Returns:
trueif state was removed,falsewhen none existed
-