com.hazelcast.queue.impl.operations
Class QueueOperation

java.lang.Object
  extended by com.hazelcast.spi.Operation
      extended by com.hazelcast.queue.impl.operations.QueueOperation
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable, RemotePropagatable<Operation>, PartitionAwareOperation
Direct Known Subclasses:
AddAllBackupOperation, CheckAndEvictOperation, ClearBackupOperation, CompareAndRemoveBackupOperation, ContainsOperation, DrainBackupOperation, IsEmptyOperation, IteratorOperation, OfferBackupOperation, PeekOperation, PollBackupOperation, QueueBackupAwareOperation, QueueTransactionRollbackOperation, RemainingCapacityOperation, RemoveBackupOperation, SizeOperation, TxnOfferBackupOperation, TxnPeekOperation, TxnPollBackupOperation, TxnPrepareBackupOperation, TxnReserveOfferBackupOperation, TxnReservePollBackupOperation, TxnRollbackBackupOperation

public abstract class QueueOperation
extends Operation
implements PartitionAwareOperation, IdentifiedDataSerializable

This class contains methods for Queue operations such as AddAllOperation.


Field Summary
protected  String name
           
protected  Object response
           
 
Constructor Summary
protected QueueOperation()
           
protected QueueOperation(String name)
           
protected QueueOperation(String name, long timeoutMillis)
           
 
Method Summary
 void afterRun()
           
 void beforeRun()
           
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 String getName()
           
protected  QueueContainer getOrCreateContainer()
           
protected  QueueService getQueueService()
           
 Object getResponse()
           
 String getServiceName()
           
 boolean hasListener()
           
 void publishEvent(ItemEventType eventType, Data data)
           
protected  void readInternal(ObjectDataInput in)
           
 boolean returnsResponse()
           
protected  void writeInternal(ObjectDataOutput out)
           
 
Methods inherited from class com.hazelcast.spi.Operation
getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getExecutorName, getInvocationTime, getLogger, getNodeEngine, getPartitionId, getReplicaIndex, getResponseHandler, getService, getWaitTimeout, isUrgent, logError, onException, readData, run, setCallerUuid, setExecutorName, setNodeEngine, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.spi.PartitionAwareOperation
getPartitionId
 
Methods inherited from interface com.hazelcast.nio.serialization.IdentifiedDataSerializable
getId
 
Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable
readData, writeData
 

Field Detail

name

protected String name

response

protected transient Object response
Constructor Detail

QueueOperation

protected QueueOperation()

QueueOperation

protected QueueOperation(String name)

QueueOperation

protected QueueOperation(String name,
                         long timeoutMillis)
Method Detail

getOrCreateContainer

protected final QueueContainer getOrCreateContainer()

getResponse

public final Object getResponse()
Specified by:
getResponse in class Operation

getServiceName

public final String getServiceName()
Overrides:
getServiceName in class Operation

getName

public final String getName()

afterRun

public void afterRun()
              throws Exception
Specified by:
afterRun in class Operation
Throws:
Exception

beforeRun

public void beforeRun()
               throws Exception
Specified by:
beforeRun in class Operation
Throws:
Exception

returnsResponse

public boolean returnsResponse()
Specified by:
returnsResponse in interface RemotePropagatable<Operation>
Specified by:
returnsResponse in class Operation

hasListener

public boolean hasListener()

publishEvent

public void publishEvent(ItemEventType eventType,
                         Data data)

writeInternal

protected void writeInternal(ObjectDataOutput out)
                      throws IOException
Specified by:
writeInternal in class Operation
Throws:
IOException

readInternal

protected void readInternal(ObjectDataInput in)
                     throws IOException
Specified by:
readInternal in class Operation
Throws:
IOException

getQueueService

protected QueueService getQueueService()

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.