Package org.glassfish.grizzly.asyncqueue
Class AsyncWriteQueueRecord
- java.lang.Object
-
- org.glassfish.grizzly.asyncqueue.AsyncQueueRecord<RecordWriteResult>
-
- org.glassfish.grizzly.asyncqueue.AsyncWriteQueueRecord
-
- All Implemented Interfaces:
Cacheable
public class AsyncWriteQueueRecord extends AsyncQueueRecord<RecordWriteResult>
AsyncQueuewrite element unit- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description static intUNCOUNTABLE_RECORD_SPACE_VALUE-
Fields inherited from class org.glassfish.grizzly.asyncqueue.AsyncQueueRecord
completionHandler, connection, isRecycled, message, recycleTrack
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAsyncWriteQueueRecord(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanBeAggregated()static AsyncWriteQueueRecordcreate(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushbackHandler, boolean isUncountable)longgetBytesToReserve()RecordWriteResultgetCurrentResult()Returns the current record result object.ObjectgetDstAddress()longgetInitialMessageSize()PushBackHandlergetPushBackHandler()Deprecated.WritableMessagegetWritableMessage()booleanisFinished()booleanisUncountable()voidnotifyCompleteAndRecycle()voidrecycle()longremaining()protected voidreset()protected voidset(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable)voidsetUncountable(boolean isUncountable)-
Methods inherited from class org.glassfish.grizzly.asyncqueue.AsyncQueueRecord
checkRecycled, getConnection, getMessage, notifyFailure, notifyIncomplete, set, setMessage
-
-
-
-
Field Detail
-
UNCOUNTABLE_RECORD_SPACE_VALUE
public static final int UNCOUNTABLE_RECORD_SPACE_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AsyncWriteQueueRecord
protected AsyncWriteQueueRecord(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable)
-
-
Method Detail
-
create
public static AsyncWriteQueueRecord create(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushbackHandler, boolean isUncountable)
-
set
protected void set(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable)
-
getDstAddress
public final Object getDstAddress()
-
getWritableMessage
public final WritableMessage getWritableMessage()
-
isUncountable
public boolean isUncountable()
- Returns:
- true if record reserves in async write queue space, that is not related to message size
remaining(), but is constantUNCOUNTABLE_RECORD_SPACE_VALUE.
-
setUncountable
public void setUncountable(boolean isUncountable)
-
getBytesToReserve
public long getBytesToReserve()
-
getInitialMessageSize
public long getInitialMessageSize()
-
remaining
public long remaining()
-
getCurrentResult
public RecordWriteResult getCurrentResult()
Description copied from class:AsyncQueueRecordReturns the current record result object.- Specified by:
getCurrentResultin classAsyncQueueRecord<RecordWriteResult>- Returns:
- the current record result object
-
getPushBackHandler
@Deprecated public PushBackHandler getPushBackHandler()
Deprecated.
-
canBeAggregated
public boolean canBeAggregated()
-
notifyCompleteAndRecycle
public void notifyCompleteAndRecycle()
-
isFinished
public boolean isFinished()
-
reset
protected final void reset()
-
recycle
public void recycle()
-
-