com.hazelcast.nio.serialization
Class DataAdapter
java.lang.Object
com.hazelcast.nio.serialization.DataAdapter
- All Implemented Interfaces:
- SocketReadable, SocketWritable
- Direct Known Subclasses:
- Packet
public class DataAdapter
- extends Object
- implements SocketWritable, SocketReadable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
data
protected Data data
context
protected PortableContext context
DataAdapter
public DataAdapter(PortableContext context)
DataAdapter
public DataAdapter(Data data,
PortableContext context)
isUrgent
public boolean isUrgent()
- Description copied from interface:
SocketWritable
- Checks if this SocketWritable is urgent.
SocketWritable that are urgent, have priority above regular SocketWritable. This is useful to implement
System Operations so that they can be send faster than regular operations; especially when the system is
under load you want these operations have precedence.
- Specified by:
isUrgent
in interface SocketWritable
- Returns:
- true if urgent, false otherwise.
writeTo
public boolean writeTo(ByteBuffer destination)
- Description copied from interface:
SocketWritable
- Asks the SocketWritable to write its content to the destination ByteBuffer.
- Specified by:
writeTo
in interface SocketWritable
- Parameters:
destination
- the ByteBuffer to write to.
- Returns:
- todo: unclear what return value means.
readFrom
public boolean readFrom(ByteBuffer source)
- Specified by:
readFrom
in interface SocketReadable
setStatus
protected final void setStatus(int bit)
isStatusSet
protected final boolean isStatusSet(int bit)
getData
public final Data getData()
setData
public final void setData(Data data)
done
public boolean done()
reset
public void reset()
getDataSize
public static int getDataSize(Data data,
PortableContext context)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.