Class TaskCollectors.CountCollector<T>
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.AbstractCollector<T,Integer>
-
- com.oracle.coherence.concurrent.executor.TaskCollectors.CountCollector<T>
-
- Type Parameters:
T- the results type.
- All Implemented Interfaces:
Task.Collector<T,List<T>,Integer>,ExternalizableLite,PortableObject,Serializable
- Enclosing class:
- TaskCollectors
public static class TaskCollectors.CountCollector<T> extends com.oracle.coherence.concurrent.executor.AbstractCollector<T,Integer>
ATask.Collectorthat counts the number of results are present.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CountCollector()Constructs aTaskCollectors.CountCollector(required for serialization).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<List<T>,Integer>finisher()Perform the final transformation from the intermediate accumulation type A to the final result type R.voidreadExternal(PofReader in)Restore the contents of a user type instance by reading its state using the specified PofReader object.voidreadExternal(DataInput in)Restore the contents of this object by loading the object's state from the passed DataInput object.voidwriteExternal(PofWriter out)Save the contents of a POF user type instance by writing its state using the specified PofWriter object.voidwriteExternal(DataOutput out)Save the contents of this object by storing the object's state into the passed DataOutput object.
-
-
-
Constructor Detail
-
CountCollector
public CountCollector()
Constructs aTaskCollectors.CountCollector(required for serialization).
-
-
Method Detail
-
finisher
public Function<List<T>,Integer> finisher()
Description copied from interface:Task.CollectorPerform the final transformation from the intermediate accumulation type A to the final result type R.- Returns:
- a function which transforms the intermediate result to the final result
-
readExternal
public void readExternal(DataInput in) throws IOException
Description copied from interface:ExternalizableLiteRestore the contents of this object by loading the object's state from the passed DataInput object.- Parameters:
in- the DataInput stream to read data from in order to restore the state of this object- Throws:
IOException- if an I/O exception occursNotActiveException- if the object is not in its initial state, and therefore cannot be deserialized into
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
Description copied from interface:ExternalizableLiteSave the contents of this object by storing the object's state into the passed DataOutput object.- Parameters:
out- the DataOutput stream to write the state of this object to- Throws:
IOException- if an I/O exception occurs
-
readExternal
public void readExternal(PofReader in) throws IOException
Description copied from interface:PortableObjectRestore the contents of a user type instance by reading its state using the specified PofReader object.- Parameters:
in- the PofReader from which to read the object's state- Throws:
IOException- if an I/O error occurs
-
writeExternal
public void writeExternal(PofWriter out) throws IOException
Description copied from interface:PortableObjectSave the contents of a POF user type instance by writing its state using the specified PofWriter object.- Parameters:
out- the PofWriter to which to write the object's state- Throws:
IOException- if an I/O error occurs
-
-