Class LinkedListSetPromise<I,E>
- java.lang.Object
-
- net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry<FunctionState,Flow>
-
- net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
-
- net.officefloor.frame.impl.execute.function.LinkedListSetPromise<I,E>
-
- All Implemented Interfaces:
FunctionState
,LinkedListSetEntry<FunctionState,Flow>
public class LinkedListSetPromise<I,E> extends AbstractDelegateFunctionState
- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LinkedListSetPromise.Translate<E>
Translates the entry to aFunctionState
.
-
Field Summary
-
Fields inherited from class net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
delegate
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E extends LinkedListSetEntry<E,O>,O>
FunctionStateall(LinkedListSet<E,O> linkedListSet, LinkedListSetPromise.Translate<E> translate)
Executes aFunctionState
for all entries of theLinkedListSet
.FunctionState
execute(FunctionStateContext context)
Executes theFunctionState
.static <E extends LinkedListSetEntry<E,O>,O>
FunctionStatepurge(LinkedListSet<E,O> linkedListSet, LinkedListSetPromise.Translate<E> translate)
Purges theLinkedListSet
and executes aFunctionState
for each item.-
Methods inherited from class net.officefloor.frame.impl.execute.function.AbstractDelegateFunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, getThreadState, handleEscalation, isRequireThreadStateSafety, toString
-
Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
-
-
-
Method Detail
-
purge
public static <E extends LinkedListSetEntry<E,O>,O> FunctionState purge(LinkedListSet<E,O> linkedListSet, LinkedListSetPromise.Translate<E> translate)
Purges theLinkedListSet
and executes aFunctionState
for each item.- Type Parameters:
E
-LinkedListSetEntry
type.O
- Owner type ofLinkedListSetEntry
.- Parameters:
linkedListSet
-LinkedListSet
.translate
-LinkedListSetPromise.Translate
.- Returns:
FunctionState
to purse theLinkedListSet
.
-
all
public static <E extends LinkedListSetEntry<E,O>,O> FunctionState all(LinkedListSet<E,O> linkedListSet, LinkedListSetPromise.Translate<E> translate)
Executes aFunctionState
for all entries of theLinkedListSet
. This does not change theLinkedListSet
(as takes copy).- Type Parameters:
E
-LinkedListSetEntry
type.O
- Owner type ofLinkedListSetEntry
.- Parameters:
linkedListSet
-LinkedListSet
.translate
-LinkedListSetPromise.Translate
.- Returns:
FunctionState
to purse theLinkedListSet
.
-
execute
public FunctionState execute(FunctionStateContext context) throws java.lang.Throwable
Description copied from interface:FunctionState
Executes theFunctionState
.- Specified by:
execute
in interfaceFunctionState
- Overrides:
execute
in classAbstractDelegateFunctionState
- Parameters:
context
-FunctionStateContext
for executing theFunctionState
.- Returns:
- Next
FunctionState
to be executed. May benull
to indicate no furtherFunctionState
instances to execute. - Throws:
java.lang.Throwable
- Possible failure ofFunctionState
logic.
-
-