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()
SocketWritableisUrgent in interface SocketWritablepublic boolean writeTo(ByteBuffer destination)
SocketWritablewriteTo in interface SocketWritabledestination - the ByteBuffer to write to.public boolean readFrom(ByteBuffer source)
readFrom in interface SocketReadableprotected 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 © 2015 Hazelcast, Inc.. All Rights Reserved.