com.hazelcast.config

## Class EntryListenerConfig.MapListenerToEntryListenerAdapter

- java.lang.Object
- - com.hazelcast.config.EntryListenerConfig.MapListenerToEntryListenerAdapter

- All Implemented Interfaces:
    EntryListener, HazelcastInstanceAware, EntryAddedListener, EntryEvictedListener, EntryRemovedListener, EntryUpdatedListener, MapClearedListener, MapEvictedListener, MapListener, DataSerializable, IdentifiedDataSerializable, EventListener
  Enclosing class:
    EntryListenerConfig

      public static class EntryListenerConfig.MapListenerToEntryListenerAdapter
      extends Object
      implements EntryListener, HazelcastInstanceAware, IdentifiedDataSerializable

  Wraps a MapListener into an EntryListener.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapListenerToEntryListenerAdapter()`
    `MapListenerToEntryListenerAdapter(MapListener mapListener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MapListenerToEntryListenerAdapter

          public MapListenerToEntryListenerAdapter()

    - #### MapListenerToEntryListenerAdapter

          public MapListenerToEntryListenerAdapter(MapListener mapListener)

  - ### Method Detail

    - #### entryAdded

          public void entryAdded(EntryEvent event)

      Description copied from interface: `EntryAddedListener`
      Invoked upon addition of an entry.
      Specified by:
        `entryAdded` in interface `EntryAddedListener`
      Parameters:
        `event` - the event invoked when an entry is added

    - #### entryEvicted

          public void entryEvicted(EntryEvent event)

      Description copied from interface: `EntryEvictedListener`
      Invoked upon eviction of an entry.
      Specified by:
        `entryEvicted` in interface `EntryEvictedListener`
      Parameters:
        `event` - the event invoked when an entry is evicted

    - #### entryRemoved

          public void entryRemoved(EntryEvent event)

      Description copied from interface: `EntryRemovedListener`
      Invoked upon removal of an entry.
      Specified by:
        `entryRemoved` in interface `EntryRemovedListener`
      Parameters:
        `event` - the event invoked when an entry is removed

    - #### entryUpdated

          public void entryUpdated(EntryEvent event)

      Description copied from interface: `EntryUpdatedListener`
      Invoked upon update of an entry.
      Specified by:
        `entryUpdated` in interface `EntryUpdatedListener`
      Parameters:
        `event` - the event invoked when an entry is updated

    - #### mapCleared

          public void mapCleared(MapEvent event)

      Description copied from interface: `MapClearedListener`
      Invoked when all entries are removed by `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.
      Specified by:
        `mapCleared` in interface `MapClearedListener`
      Parameters:
        `event` - the map event invoked when all entries are removed by `IMap.clear()`

    - #### mapEvicted

          public void mapEvicted(MapEvent event)

      Description copied from interface: `MapEvictedListener`
      Invoked when all entries are evicted by `IMap.evictAll()`.
      Specified by:
        `mapEvicted` in interface `MapEvictedListener`
      Parameters:
        `event` - the map event invoked when all entries are evicted by `IMap.evictAll()`

    - #### setHazelcastInstance

          public void setHazelcastInstance(HazelcastInstance hazelcastInstance)

      Description copied from interface: `HazelcastInstanceAware`
      Gets the HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
      Specified by:
        `setHazelcastInstance` in interface `HazelcastInstanceAware`
      Parameters:
        `hazelcastInstance` - the HazelcastInstance reference

    - #### getMapListener

          public MapListener getMapListener()

    - #### 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

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2020. All rights reserved.