Package org.glassfish.grizzly.asyncqueue
Class AsyncQueueRecord<R>
- java.lang.Object
-
- org.glassfish.grizzly.asyncqueue.AsyncQueueRecord<R>
-
- Type Parameters:
R- the result type
- All Implemented Interfaces:
Cacheable
- Direct Known Subclasses:
AsyncReadQueueRecord,AsyncWriteQueueRecord
public abstract class AsyncQueueRecord<R> extends Object implements Cacheable
AsyncQueueelement unit- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description protected CompletionHandlercompletionHandlerprotected Connectionconnectionprotected booleanisRecycledprotected Objectmessageprotected DebugPointrecycleTrack
-
Constructor Summary
Constructors Modifier Constructor Description protectedAsyncQueueRecord()AsyncQueueRecord(Connection connection, Object message, CompletionHandler completionHandler)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckRecycled()ConnectiongetConnection()abstract RgetCurrentResult()Returns the current record result object.<T> TgetMessage()voidnotifyFailure(Throwable e)voidnotifyIncomplete()protected voidset(Connection connection, Object message, CompletionHandler completionHandler)voidsetMessage(Object message)
-
-
-
Field Detail
-
connection
protected Connection connection
-
message
protected Object message
-
completionHandler
protected CompletionHandler completionHandler
-
isRecycled
protected boolean isRecycled
-
recycleTrack
protected DebugPoint recycleTrack
-
-
Constructor Detail
-
AsyncQueueRecord
protected AsyncQueueRecord()
-
AsyncQueueRecord
public AsyncQueueRecord(Connection connection, Object message, CompletionHandler completionHandler)
-
-
Method Detail
-
set
protected final void set(Connection connection, Object message, CompletionHandler completionHandler)
-
getConnection
public Connection getConnection()
-
getMessage
public final <T> T getMessage()
-
setMessage
public final void setMessage(Object message)
-
getCurrentResult
public abstract R getCurrentResult()
Returns the current record result object.- Returns:
- the current record result object
-
notifyFailure
public void notifyFailure(Throwable e)
-
notifyIncomplete
public final void notifyIncomplete()
-
checkRecycled
protected final void checkRecycled()
-
-