com.hazelcast.web
Class DestroySessionEntryProcessor

java.lang.Object
  extended by com.hazelcast.map.AbstractEntryProcessor<String,T>
      extended by com.hazelcast.web.AbstractWebDataEntryProcessor<Integer>
          extended by com.hazelcast.web.DestroySessionEntryProcessor
All Implemented Interfaces:
EntryProcessor<String,Integer>, DataSerializable, IdentifiedDataSerializable, Serializable

public class DestroySessionEntryProcessor
extends AbstractWebDataEntryProcessor<Integer>

Decrements the reference count for a session, returning Boolean.TRUE or Boolean.FALSE to indicate whether the reference count has reached zero. If the reference count reaches zero, the session ID is removed by this processor to reduce network calls.

Since:
3.3
See Also:
Serialized Form

Constructor Summary
DestroySessionEntryProcessor()
           
 
Method Summary
 int getId()
          Returns type identifier for this class.
 Object process(Map.Entry<String,Integer> entry)
          Process the entry without worrying about concurrency.
 
Methods inherited from class com.hazelcast.web.AbstractWebDataEntryProcessor
getFactoryId, readData, writeData
 
Methods inherited from class com.hazelcast.map.AbstractEntryProcessor
getBackupProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DestroySessionEntryProcessor

public DestroySessionEntryProcessor()
Method Detail

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Returns:
type id

process

public Object process(Map.Entry<String,Integer> entry)
Description copied from interface: EntryProcessor
Process the entry without worrying about concurrency.

Note that to modify an entry by using EntryProcessor you should explicitly call Map.Entry.setValue(V) method of Map.Entry such as:

 
 Override
        public Object process(Map.Entry entry) {
          Value value = entry.getValue();
          // process and modify value
          // ...
          entry.setValue(value);
          return result;
        }
 
 
otherwise EntryProcessor does not guarantee to modify the entry.

Parameters:
entry - entry to be processed
Returns:
result of the process


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