public class DataAdapter extends Object implements SocketWritable, SocketReadable
Modifier and Type | Field and Description |
---|---|
protected PortableContext |
context |
protected Data |
data |
Constructor and Description |
---|
DataAdapter(Data data,
PortableContext context) |
DataAdapter(PortableContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
done() |
Data |
getData() |
static int |
getDataSize(Data data,
PortableContext context) |
protected boolean |
isStatusSet(int bit) |
boolean |
isUrgent()
Checks if this SocketWritable is urgent.
|
boolean |
readFrom(ByteBuffer source) |
void |
reset() |
void |
setData(Data data) |
protected void |
setStatus(int bit) |
boolean |
writeTo(ByteBuffer destination)
Asks the SocketWritable to write its content to the destination ByteBuffer.
|
protected Data data
protected PortableContext context
public DataAdapter(PortableContext context)
public DataAdapter(Data data, PortableContext context)
public boolean isUrgent()
SocketWritable
isUrgent
in interface SocketWritable
public boolean writeTo(ByteBuffer destination)
SocketWritable
writeTo
in interface SocketWritable
destination
- the ByteBuffer to write to.public boolean readFrom(ByteBuffer source)
readFrom
in interface SocketReadable
protected final void setStatus(int bit)
protected final boolean isStatusSet(int bit)
public final Data getData()
public final void setData(Data data)
public boolean done()
public void reset()
public static int getDataSize(Data data, PortableContext context)
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.