Package com.tangosol.net.topic
Class Publisher.OrderByValue<V>
- java.lang.Object
-
- com.tangosol.net.topic.Publisher.OrderBy<V>
-
- com.tangosol.net.topic.Publisher.OrderByValue<V>
-
- Type Parameters:
V- the value type
- All Implemented Interfaces:
ExternalizableLite,PortableObject,Publisher.Option<V>,Serializable
- Direct Known Subclasses:
Publisher.OrderByRoundRobin
public static class Publisher.OrderByValue<V> extends Publisher.OrderBy<V>
Publisher.OrderByoption which computes the unit-of-order based on applyingconstructor'sorderIdFunction parameteronsent value.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ToIntFunction<? super V>m_orderIdFunctionA function used to compute the unit-of-order from the value type V.
-
Constructor Summary
Constructors Modifier Constructor Description OrderByValue()protectedOrderByValue(ToIntFunction<? super V> orderIdFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOrderId(V value)Return unit-of-order id.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.StringtoString()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.-
Methods inherited from class com.tangosol.net.topic.Publisher.OrderBy
id, none, roundRobin, thread, value, value
-
-
-
-
Field Detail
-
m_orderIdFunction
protected ToIntFunction<? super V> m_orderIdFunction
A function used to compute the unit-of-order from the value type V.
-
-
Constructor Detail
-
OrderByValue
public OrderByValue()
-
OrderByValue
protected OrderByValue(ToIntFunction<? super V> orderIdFunction)
-
-
Method Detail
-
getOrderId
public int getOrderId(V value)
Description copied from class:Publisher.OrderByReturn unit-of-order id.- Specified by:
getOrderIdin classPublisher.OrderBy<V>- Returns:
- the unit-of-order id
-
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
-
-