com.hazelcast.map.impl.operation
Class PartitionWideEntryWithPredicateOperation

java.lang.Object
  extended by com.hazelcast.spi.Operation
      extended by com.hazelcast.spi.AbstractOperation
          extended by com.hazelcast.spi.impl.AbstractNamedOperation
              extended by com.hazelcast.map.impl.operation.AbstractMapOperation
                  extended by com.hazelcast.map.impl.operation.PartitionWideEntryOperation
                      extended by com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateOperation
All Implemented Interfaces:
DataSerializable, BackupAwareOperation, RemotePropagatable<Operation>, PartitionAwareOperation

public class PartitionWideEntryWithPredicateOperation
extends PartitionWideEntryOperation


Field Summary
protected  EntryBackupProcessor backupProcessor
           
protected  EntryProcessor entryProcessor
           
protected  RecordStore recordStore
           
protected  MapEntrySet responses
           
 
Fields inherited from class com.hazelcast.map.impl.operation.AbstractMapOperation
mapContainer, mapService
 
Fields inherited from class com.hazelcast.spi.impl.AbstractNamedOperation
name
 
Constructor Summary
PartitionWideEntryWithPredicateOperation()
           
PartitionWideEntryWithPredicateOperation(String name, EntryProcessor entryProcessor, Predicate predicate)
           
 
Method Summary
protected  void addToResponses(Data key, Data response)
           
protected  Map.Entry createMapEntry(Object key, Object value)
           
protected  void doPostOps(Data key, Object oldValue, Map.Entry entry)
           
protected  boolean entryAddedOrUpdated(Map.Entry entry, Data key, Object oldValue, long now)
           
protected  boolean entryAddedOrUpdatedBackup(Map.Entry entry, Data key)
           
protected  boolean entryRemoved(Map.Entry entry, Data key, Object oldValue, long now)
           
protected  boolean entryRemovedBackup(Map.Entry entry, Data key)
           
protected  void evict(boolean backup)
           
 Operation getBackupOperation()
          Creates the BackupOperation responsible for making the backup.
protected  long getLatencyFrom(long begin)
           
protected  LocalMapStatsImpl getLocalMapStats()
           
protected  MapEventPublisher getMapEventPublisher()
           
protected  MapServiceContext getMapServiceContext()
           
protected  long getNow()
           
protected  Predicate getPredicate()
           
protected  RecordStore getRecordStore()
           
protected  Object getValueFor(Data dataKey, long now)
           
protected  boolean hasRegisteredListenerForThisMap()
           
protected  void invalidateNearCaches(Data key)
           
protected  boolean keyNotOwnedByThisPartition(Data key)
           
protected  boolean noOp(Map.Entry entry, Object oldValue)
          Entry has not exist and no add operation has been done.
protected  Object nullifyOldValueIfNecessary(Object oldValue, EntryEventType eventType)
          Nullify old value if in memory format is object and operation is not removal since old and new value in fired event EntryEvent may be same due to the object in memory format.
protected  Data process(Map.Entry entry)
           
protected  void processBackup(Map.Entry entry)
           
protected  Object publishEntryEvent(Data key, Object value, Object oldValue, EntryEventType eventType)
           
protected  void publishWanReplicationEvent(Data key, Object value, EntryEventType eventType)
           
protected  void put(Data key, Object value)
           
protected  void readInternal(ObjectDataInput in)
           
protected  Data toData(Object obj)
           
protected  Object toObject(Object data)
           
 String toString()
           
protected  void writeInternal(ObjectDataOutput out)
           
 
Methods inherited from class com.hazelcast.map.impl.operation.PartitionWideEntryOperation
getAsyncBackupCount, getResponse, getSyncBackupCount, innerBeforeRun, returnsResponse, run, shouldBackup
 
Methods inherited from class com.hazelcast.map.impl.operation.AbstractMapOperation
afterRun, beforeRun
 
Methods inherited from class com.hazelcast.spi.impl.AbstractNamedOperation
getName
 
Methods inherited from class com.hazelcast.spi.Operation
getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getExecutorName, getInvocationTime, getLogger, getNodeEngine, getPartitionId, getReplicaIndex, getResponseHandler, getService, getServiceName, getWaitTimeout, isUrgent, logError, onException, readData, setCallerUuid, setExecutorName, setNodeEngine, setPartitionId, setReplicaIndex, setResponseHandler, setService, setServiceName, setValidateTarget, setWaitTimeout, 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
 

Field Detail

responses

protected MapEntrySet responses

entryProcessor

protected EntryProcessor entryProcessor

backupProcessor

protected EntryBackupProcessor backupProcessor

recordStore

protected transient RecordStore recordStore
Constructor Detail

PartitionWideEntryWithPredicateOperation

public PartitionWideEntryWithPredicateOperation()

PartitionWideEntryWithPredicateOperation

public PartitionWideEntryWithPredicateOperation(String name,
                                                EntryProcessor entryProcessor,
                                                Predicate predicate)
Method Detail

getPredicate

protected Predicate getPredicate()
Overrides:
getPredicate in class PartitionWideEntryOperation

readInternal

protected void readInternal(ObjectDataInput in)
                     throws IOException
Overrides:
readInternal in class PartitionWideEntryOperation
Throws:
IOException

writeInternal

protected void writeInternal(ObjectDataOutput out)
                      throws IOException
Overrides:
writeInternal in class PartitionWideEntryOperation
Throws:
IOException

toString

public String toString()
Overrides:
toString in class PartitionWideEntryOperation

getBackupOperation

public Operation getBackupOperation()
Description copied from interface: BackupAwareOperation
Creates the BackupOperation responsible for making the backup.

Specified by:
getBackupOperation in interface BackupAwareOperation
Overrides:
getBackupOperation in class PartitionWideEntryOperation
Returns:
the created BackupOperation.

getRecordStore

protected RecordStore getRecordStore()

createMapEntry

protected Map.Entry createMapEntry(Object key,
                                   Object value)

hasRegisteredListenerForThisMap

protected boolean hasRegisteredListenerForThisMap()

nullifyOldValueIfNecessary

protected Object nullifyOldValueIfNecessary(Object oldValue,
                                            EntryEventType eventType)
Nullify old value if in memory format is object and operation is not removal since old and new value in fired event EntryEvent may be same due to the object in memory format.


getMapEventPublisher

protected MapEventPublisher getMapEventPublisher()

getLocalMapStats

protected LocalMapStatsImpl getLocalMapStats()

noOp

protected boolean noOp(Map.Entry entry,
                       Object oldValue)
Entry has not exist and no add operation has been done.


entryRemoved

protected boolean entryRemoved(Map.Entry entry,
                               Data key,
                               Object oldValue,
                               long now)

entryAddedOrUpdated

protected boolean entryAddedOrUpdated(Map.Entry entry,
                                      Data key,
                                      Object oldValue,
                                      long now)

doPostOps

protected void doPostOps(Data key,
                         Object oldValue,
                         Map.Entry entry)

entryRemovedBackup

protected boolean entryRemovedBackup(Map.Entry entry,
                                     Data key)

entryAddedOrUpdatedBackup

protected boolean entryAddedOrUpdatedBackup(Map.Entry entry,
                                            Data key)

put

protected void put(Data key,
                   Object value)

toObject

protected Object toObject(Object data)

toData

protected Data toData(Object obj)

getNow

protected long getNow()

invalidateNearCaches

protected void invalidateNearCaches(Data key)

publishEntryEvent

protected Object publishEntryEvent(Data key,
                                   Object value,
                                   Object oldValue,
                                   EntryEventType eventType)

publishWanReplicationEvent

protected void publishWanReplicationEvent(Data key,
                                          Object value,
                                          EntryEventType eventType)

getMapServiceContext

protected MapServiceContext getMapServiceContext()

getLatencyFrom

protected long getLatencyFrom(long begin)

addToResponses

protected void addToResponses(Data key,
                              Data response)

process

protected Data process(Map.Entry entry)

processBackup

protected void processBackup(Map.Entry entry)

getValueFor

protected Object getValueFor(Data dataKey,
                             long now)

keyNotOwnedByThisPartition

protected boolean keyNotOwnedByThisPartition(Data key)

evict

protected void evict(boolean backup)


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