java.lang.Object
org.glassfish.grizzly.asyncqueue.AsyncQueueRecord<RecordWriteResult>
org.glassfish.grizzly.asyncqueue.AsyncWriteQueueRecord
- All Implemented Interfaces:
Cacheable
AsyncQueue write element unit- Author:
- Alexey Stashok
-
Field Summary
FieldsFields inherited from class org.glassfish.grizzly.asyncqueue.AsyncQueueRecord
completionHandler, connection, isRecycled, message, recycleTrack -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAsyncWriteQueueRecord(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic AsyncWriteQueueRecordcreate(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushbackHandler, boolean isUncountable) longReturns the current record result object.final ObjectlongDeprecated.final WritableMessagebooleanbooleanvoidvoidrecycle()longprotected final 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 Details
-
UNCOUNTABLE_RECORD_SPACE_VALUE
public static final int UNCOUNTABLE_RECORD_SPACE_VALUE- See Also:
-
-
Constructor Details
-
AsyncWriteQueueRecord
protected AsyncWriteQueueRecord(Connection connection, WritableMessage message, CompletionHandler completionHandler, Object dstAddress, PushBackHandler pushBackHandler, boolean isUncountable)
-
-
Method Details
-
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
-
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
Description copied from class:AsyncQueueRecordReturns the current record result object.- Specified by:
getCurrentResultin classAsyncQueueRecord<RecordWriteResult>- Returns:
- the current record result object
-
getPushBackHandler
Deprecated. -
canBeAggregated
public boolean canBeAggregated() -
notifyCompleteAndRecycle
public void notifyCompleteAndRecycle() -
isFinished
public boolean isFinished() -
reset
protected final void reset() -
recycle
public void recycle()
-