public class ReferenceSessionEntryProcessor extends AbstractWebDataEntryProcessor<Integer>
Boolean.FALSE
if the entry does not exist and
Boolean.TRUE
otherwise.
This EntryProcessor
is intended to be used to check whether a session is known to the cluster
in preparation to create a local "copy". When Boolean.FALSE
is returned, it means the
session is not known and a new session should be created. Otherwise, if the entry already exists, the
reference count is incremented and Boolean.TRUE
is returned to indicate a "copy" should be made.Constructor and Description |
---|
ReferenceSessionEntryProcessor() |
Modifier and Type | Method and Description |
---|---|
int |
getId()
Returns type identifier for this class.
|
Object |
process(Map.Entry<String,Integer> entry)
Process the entry without worrying about concurrency.
|
getFactoryId, readData, writeData
getBackupProcessor
public int getId()
IdentifiedDataSerializable
public Object process(Map.Entry<String,Integer> entry)
EntryProcessor
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.entry
- entry to be processedCopyright © 2014 Hazelcast, Inc.. All Rights Reserved.