K
- type of the messageL
- type of the addresspublic class WriteResult<K,L> extends Object implements Result, Cacheable
Writeable
.Modifier | Constructor and Description |
---|---|
protected |
WriteResult() |
Modifier and Type | Method and Description |
---|---|
Object |
copy() |
static <K,L> WriteResult<K,L> |
create(Connection<L> connection) |
static <K,L> WriteResult<K,L> |
create(Connection<L> connection,
K message,
L dstAddress,
long writeSize) |
protected Holder<L> |
createAddrHolder(L dstAddress)
Create an address holder.
|
Connection<L> |
getConnection()
Get the
Connection data were read from. |
L |
getDstAddress()
Get the destination address, the message was written to.
|
Holder<L> |
getDstAddressHolder()
Get the destination address, the message was written to.
|
K |
getMessage()
Get the message, which was read.
|
long |
getWrittenSize()
Get the number of bytes, which were written.
|
void |
recycle() |
protected void |
reset() |
protected void |
set(Connection<L> connection,
K message,
L dstAddress,
long writtenSize)
One method to set all the WriteResult properties.
|
void |
setDstAddress(L dstAddress)
Set the destination address, the message was written to.
|
void |
setDstAddressHolder(Holder<L> dstAddressHolder)
Set the destination address, the message was written to.
|
void |
setMessage(K message)
Set the message, which was read.
|
void |
setWrittenSize(long writeSize)
Set the number of bytes, which were written.
|
public static <K,L> WriteResult<K,L> create(Connection<L> connection)
public static <K,L> WriteResult<K,L> create(Connection<L> connection, K message, L dstAddress, long writeSize)
public final Connection<L> getConnection()
Connection
data were read from.getConnection
in interface Result
Connection
data were read from.public final K getMessage()
public final void setMessage(K message)
message
- the message, which was read.public final L getDstAddress()
public final Holder<L> getDstAddressHolder()
public final void setDstAddress(L dstAddress)
dstAddress
- the destination address, the message was written to.public final void setDstAddressHolder(Holder<L> dstAddressHolder)
dstAddressHolder
- the destination address, the message was written to.public final long getWrittenSize()
public final void setWrittenSize(long writeSize)
writeSize
- the number of bytes, which were written.protected void set(Connection<L> connection, K message, L dstAddress, long writtenSize)
connection
- message
- dstAddress
- writtenSize
- protected Holder<L> createAddrHolder(L dstAddress)
dstAddress
- protected void reset()
Copyright © 2015 Oracle Corporation. All rights reserved.