Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accept(T) - Method in interface io.github.jonloucks.concurrency.api.WaitableConsumer
-
Assign a new value
- acceptIf(Predicate<T>, T) - Method in interface io.github.jonloucks.concurrency.api.WaitableConsumer
-
Assign a new value if conditions are satisfied
C
- canTransition(String, Idempotent) - Method in enum class io.github.jonloucks.concurrency.api.Idempotent
- canTransition(String, T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Rule
-
Determine if 'this' state can transition to the target
- CLOSED - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
A state that all new actions are invalid Implementations can decide to ignore or throw exception, but never be processed.
- CLOSING - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
A state of closing or shutting down.
- Concurrency - Interface in io.github.jonloucks.concurrency.api
-
The Concurrency API
- Concurrency.Config - Interface in io.github.jonloucks.concurrency.api
-
The configuration used to create a new Concurrency instance.
- Concurrency.Config.Builder - Interface in io.github.jonloucks.concurrency.api
-
The Concurrency configuration
- ConcurrencyException - Exception in io.github.jonloucks.concurrency.api
-
Runtime exception thrown for Concurrency related problems.
- ConcurrencyException(String) - Constructor for exception io.github.jonloucks.concurrency.api.ConcurrencyException
-
Passthrough for
RuntimeException(String)
- ConcurrencyException(String, Throwable) - Constructor for exception io.github.jonloucks.concurrency.api.ConcurrencyException
-
Passthrough for
RuntimeException(String, Throwable)
- ConcurrencyFactory - Interface in io.github.jonloucks.concurrency.api
-
Responsible for creating new instances of Concurrency
- CONTRACT - Static variable in interface io.github.jonloucks.concurrency.api.Concurrency
-
Access the current Concurrency implementation
- CONTRACT - Static variable in interface io.github.jonloucks.concurrency.api.ConcurrencyFactory
-
Used to promise and claim the ConcurrencyFactory implementation
- CONTRACT - Static variable in interface io.github.jonloucks.concurrency.api.StateMachineFactory
-
The StateMachineFactory Contract
- CONTRACT - Static variable in interface io.github.jonloucks.concurrency.api.WaitableFactory
-
The Contract for the WaitableFactory
- contracts() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
- contracts(Contracts) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
- create(Concurrency.Config) - Method in interface io.github.jonloucks.concurrency.api.ConcurrencyFactory
-
Create a new instance of Concurrency
- create(StateMachine.Config<T>) - Method in interface io.github.jonloucks.concurrency.api.StateMachineFactory
-
Create a new StateMachine by configuration
- create(Class<T>, T) - Method in interface io.github.jonloucks.concurrency.api.StateMachineFactory
-
Create a new StateMachine from an Enum class
- create(Consumer<Concurrency.Config.Builder>) - Method in interface io.github.jonloucks.concurrency.api.ConcurrencyFactory
-
Create a new instance of Concurrency
- create(Consumer<StateMachine.Config.Builder<T>>) - Method in interface io.github.jonloucks.concurrency.api.StateMachineFactory
-
Create a new StateMachine by configuration callback
- create(T) - Method in interface io.github.jonloucks.concurrency.api.StateMachineFactory
-
Create a new StateMachine
- create(T) - Method in interface io.github.jonloucks.concurrency.api.WaitableFactory
-
Create a new Waitable with the given initial value
- createConcurrency(Concurrency.Config) - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Create a new Concurrency instance for customized deployments.
- createStateMachine(Contracts) - Static method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Create a StateMachine for Idempotency
- createStateMachine(Class<T>, T) - Method in interface io.github.jonloucks.concurrency.api.Concurrency
-
Create a new StateMachine
- createStateMachine(Class<T>, T) - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Create a new StateMachine
- createStateMachine(Consumer<StateMachine.Config.Builder<T>>) - Method in interface io.github.jonloucks.concurrency.api.Concurrency
-
Create a new StateMachine by configuration callback
- createStateMachine(T) - Method in interface io.github.jonloucks.concurrency.api.Concurrency
-
Create a new StateMachine
- createStateMachine(T) - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Create a new StateMachine
- createWaitable(T) - Method in interface io.github.jonloucks.concurrency.api.Concurrency
-
Create a new Waitable with the given initial value
- createWaitable(T) - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Create a new Waitable with the given initial value
D
- DEFAULT - Static variable in interface io.github.jonloucks.concurrency.api.Concurrency.Config
-
The default configuration used when creating a new Concurrency instance
- DESTROYED - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Represents a permanent end state.
E
- errorState(S) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional error state used if there is exception
- errorValue(Supplier<R>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional error value Note: if this is set, when an exception occurs this value will be returned
- event(String) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the required event name
F
- FACTORY - Static variable in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
-
Concurrency Config Builder
- failedState(S) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional failed state used if the goal state is not allowed
- failedValue(Supplier<R>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional failed value used when the goal state is not allowed
- findConcurrencyFactory(Concurrency.Config) - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Finds the ConcurrencyFactory implementation
G
- get() - Method in interface io.github.jonloucks.concurrency.api.WaitableSupplier
- getErrorState() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getErrorValue() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getEvent() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getFailedState() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getFailedValue() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getIf(Predicate<T>) - Method in interface io.github.jonloucks.concurrency.api.WaitableSupplier
-
Gets the current value if it satisfies a condition
- getInitial() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config
-
Return the initial value.
- getInstance() - Static method in class io.github.jonloucks.concurrency.api.GlobalConcurrency
-
Return the global instance of Contracts
- getState() - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Get the current state
- getStateRules(T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config
-
Get all the rules for a specified state
- getStates() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config
- getSuccessState() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getSuccessValue() - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition
- getWhen(Predicate<T>) - Method in interface io.github.jonloucks.concurrency.api.WaitableSupplier
-
Waits until the current value if it satisfies a condition
- getWhen(Predicate<T>, Duration) - Method in interface io.github.jonloucks.concurrency.api.WaitableSupplier
-
Waits until the current value if it satisfies a condition or a timeout is reached
- GlobalConcurrency - Class in io.github.jonloucks.concurrency.api
-
Globally shared Concurrency singleton
H
- hasState(T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Determine if the given state is known
I
- Idempotent - Enum Class in io.github.jonloucks.concurrency.api
-
Idempotent state machine states
- initial(T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config.Builder
-
Assign the required initial state
- install(Concurrency.Config, Repository) - Method in interface io.github.jonloucks.concurrency.api.ConcurrencyFactory
-
Install all the requirements and promises to the given Contracts Repository.
- io.github.jonloucks.concurrency.api - module io.github.jonloucks.concurrency.api
-
The API module for Concurrency
- io.github.jonloucks.concurrency.api - package io.github.jonloucks.concurrency.api
- isRejecting() - Method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Determines if new requests/action should be rejected
- isTransitionAllowed(String, T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Determine if a transition is allowed from the current state to a new one.
O
- OPENABLE - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Initial state OPENABLE can transition to OPENED, OPENING, CLOSED, or DESTROYED.
- OPENED - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Resource, service is open to actions OPEN can transition to CLOSING or CLOSED.
- OPENING - Enum constant in enum class io.github.jonloucks.concurrency.api.Idempotent
-
For use cases where the open can take some time or reentrancy calls while initializing.
R
- reflectionClassName() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
- reflectionClassName(String) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
- rule(T, StateMachine.Rule<T>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config.Builder
-
Add a rule to a state
- rules(T, List<StateMachine.Rule<T>>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config.Builder
-
Add many rules to a state
S
- serviceLoaderClass() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
- serviceLoaderClass(Class<? extends ConcurrencyFactory>) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
- setState(String, T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Set the current state, state must already exist and be an allowed transition
- shutdown() - Method in interface io.github.jonloucks.concurrency.api.Waitable
-
Aborts all waiting threads.
- shutdownTimeout() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
-
How long to wait for logging to shut down before giving up
- shutdownTimeout(Duration) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
- state(T) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config.Builder
-
Add a new state
- StateMachine<T> - Interface in io.github.jonloucks.concurrency.api
-
State machine.
- StateMachine.Config<T> - Interface in io.github.jonloucks.concurrency.api
-
StateMachine configuration
- StateMachine.Config.Builder<T> - Interface in io.github.jonloucks.concurrency.api
-
The Builder for a State Machine
- StateMachine.Rule<T> - Interface in io.github.jonloucks.concurrency.api
-
Opt-in interface a state type can implement to assist in determining the valid transitions
- StateMachine.Transition<S,
R> - Interface in io.github.jonloucks.concurrency.api -
Defines how a transition between states will be done
- StateMachine.Transition.Builder<B extends StateMachine.Transition.Builder<B,
S, R>, S, R> - Interface in io.github.jonloucks.concurrency.api -
Responsible for building a Transition
- StateMachineFactory - Interface in io.github.jonloucks.concurrency.api
-
Rule machine, containing a set of sets that can be transitioned to by events/actions
- states(List<T>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Config.Builder
-
Add a list of states
- successState(S) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the required success state
- successValue(Runnable) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional success block
- successValue(Supplier<R>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine.Transition.Builder
-
Assign the optional success value
T
- transition(StateMachine.Transition<T, R>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Execute a transition from the current state to another
- transition(Consumer<StateMachine.Transition.Builder<B, T, R>>) - Method in interface io.github.jonloucks.concurrency.api.StateMachine
-
Execute a transition from the current state to another
U
- useReflection() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
- useReflection(boolean) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
- useServiceLoader() - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config
- useServiceLoader(boolean) - Method in interface io.github.jonloucks.concurrency.api.Concurrency.Config.Builder
V
- valueOf(String) - Static method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- Waitable<T> - Interface in io.github.jonloucks.concurrency.api
-
Provides mutable reference that allows other threads to wait until the value satisfies a given condition.
- WaitableConsumer<T> - Interface in io.github.jonloucks.concurrency.api
-
Waitable consumer
- WaitableFactory - Interface in io.github.jonloucks.concurrency.api
-
Waitable Factory
- WaitableSupplier<T> - Interface in io.github.jonloucks.concurrency.api
-
Waitable supplier
- waitFor(Predicate<T>) - Method in interface io.github.jonloucks.concurrency.api.Waitable
-
Deprecated.
- waitFor(Predicate<T>, Duration) - Method in interface io.github.jonloucks.concurrency.api.Waitable
-
Deprecated.Replaced by
getWhen(Predicate, Duration)
- withClose(StateMachine<Idempotent>, AutoClose) - Static method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Assist with an idempotent close
- withOpen(StateMachine<Idempotent>, AutoOpen) - Static method in enum class io.github.jonloucks.concurrency.api.Idempotent
-
Assist with an idempotent close
All Classes and Interfaces|All Packages|Serialized Form
getWhen(Predicate)