public static class EntryListenerConfig.MapListenerToEntryListenerAdapter extends Object implements EntryListener, HazelcastInstanceAware, IdentifiedDataSerializable
Constructor and Description |
---|
MapListenerToEntryListenerAdapter() |
MapListenerToEntryListenerAdapter(MapListener mapListener) |
Modifier and Type | Method and Description |
---|---|
void |
entryAdded(EntryEvent event)
Invoked upon addition of an entry.
|
void |
entryEvicted(EntryEvent event)
Invoked upon eviction of an entry.
|
void |
entryRemoved(EntryEvent event)
Invoked upon removal of an entry.
|
void |
entryUpdated(EntryEvent event)
Invoked upon update of an entry.
|
boolean |
equals(Object o) |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
MapListener |
getMapListener() |
int |
hashCode() |
void |
mapCleared(MapEvent event)
Invoked when all entries are removed by
IMap.clear() . |
void |
mapEvicted(MapEvent event)
Invoked when all entries are evicted by
IMap.evictAll() . |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
setHazelcastInstance(HazelcastInstance hazelcastInstance)
Gets the HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public MapListenerToEntryListenerAdapter()
public MapListenerToEntryListenerAdapter(MapListener mapListener)
public void entryAdded(EntryEvent event)
EntryAddedListener
entryAdded
in interface EntryAddedListener
event
- the event invoked when an entry is addedpublic void entryEvicted(EntryEvent event)
EntryEvictedListener
entryEvicted
in interface EntryEvictedListener
event
- the event invoked when an entry is evictedpublic void entryRemoved(EntryEvent event)
EntryRemovedListener
entryRemoved
in interface EntryRemovedListener
event
- the event invoked when an entry is removedpublic void entryUpdated(EntryEvent event)
EntryUpdatedListener
entryUpdated
in interface EntryUpdatedListener
event
- the event invoked when an entry is updatedpublic void mapCleared(MapEvent event)
MapClearedListener
IMap.clear()
.
When a listener is registered as local-only then it will be invoked if and only if
the clear()
method is called on the same instance where the listener
was registered to.mapCleared
in interface MapClearedListener
event
- the map event invoked when all entries are removed by IMap.clear()
public void mapEvicted(MapEvent event)
MapEvictedListener
IMap.evictAll()
.mapEvicted
in interface MapEvictedListener
event
- the map event invoked when all entries are evicted by IMap.evictAll()
public void setHazelcastInstance(HazelcastInstance hazelcastInstance)
HazelcastInstanceAware
setHazelcastInstance
in interface HazelcastInstanceAware
hazelcastInstance
- the HazelcastInstance referencepublic MapListener getMapListener()
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2018 Hazelcast, Inc.. All rights reserved.