com.hazelcast.client.console

## Class ClientConsoleApp

- java.lang.Object
- - com.hazelcast.client.console.ClientConsoleApp

- All Implemented Interfaces:
    EntryListener, ItemListener, MessageListener, EntryAddedListener, EntryEvictedListener, EntryRemovedListener, EntryUpdatedListener, MapClearedListener, MapEvictedListener, MapListener, EventListener

      public class ClientConsoleApp
      extends Object
      implements EntryListener, ItemListener, MessageListener

  A demo application to demonstrate a Hazelcast client. This is probably NOT something you want to use in production.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientConsoleApp(HazelcastInstance hazelcast)`

  - ### Method Summary

    All Methods Static 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.
    `IAtomicLong` | `getAtomicNumber()`
    `IList<Object>` | `getList()`
    `IMap<Object,Object>` | `getMap()`
    `MultiMap<Object,Object>` | `getMultiMap()`
    `IQueue<Object>` | `getQueue()`
    `ISet<Object>` | `getSet()`
    `ITopic<Object>` | `getTopic()`
    `protected void` | `handleAddListener(String[] args)`
    `protected void` | `handleClear(String[] args)`
    `protected void` | `handleCommand(String commandInputted)` Handle a command.
    `protected void` | `handleContains(String[] args)`
    `protected void` | `handleDestroy(String[] args)`
    `protected void` | `handleHelp(String command)` Handles the help command.
    `protected void` | `handleInstances(String[] args)`
    `protected void` | `handleIterator(String[] args)`
    `protected void` | `handleListAdd(String[] args)`
    `protected void` | `handleListAddMany(String[] args)`
    `protected void` | `handleListContains(String[] args)`
    `protected void` | `handleListRemove(String[] args)`
    `protected void` | `handleListSet(String[] args)`
    `protected void` | `handleLock(String[] args)`
    `protected void` | `handleMapDelete(String[] args)`
    `protected void` | `handleMapEntries()`
    `protected void` | `handleMapEvict(String[] args)`
    `protected void` | `handleMapGet(String[] args)`
    `protected void` | `handleMapGetAsync(String[] args)`
    `protected void` | `handleMapGetMany(String[] args)`
    `protected void` | `handleMapGetMapEntry(String[] args)`
    `protected void` | `handleMapKeys()`
    `protected void` | `handleMapLocalKeys()`
    `protected void` | `handleMapLocalSize()`
    `protected void` | `handleMapLock(String[] args)`
    `protected void` | `handleMapPut(String[] args)`
    `protected void` | `handleMapPutAsync(String[] args)`
    `protected void` | `handleMapPutIfAbsent(String[] args)`
    `protected void` | `handleMapPutMany(String[] args)`
    `protected void` | `handleMapRemove(String[] args)`
    `protected void` | `handleMapRemoveMany(String[] args)`
    `protected void` | `handleMapReplace(String[] args)`
    `protected void` | `handleMapTryLock(String[] args)`
    `protected void` | `handleMapUnlock(String[] args)`
    `protected void` | `handleMapValues()`
    `protected void` | `handleMultiMapEntries()`
    `protected void` | `handleMultiMapGet(String[] args)`
    `protected void` | `handleMultiMapKeys()`
    `protected void` | `handleMultiMapLock(String[] args)`
    `protected void` | `handleMultiMapPut(String[] args)`
    `protected void` | `handleMultiMapRemove(String[] args)`
    `protected void` | `handleMultiMapTryLock(String[] args)`
    `protected void` | `handleMultiMapUnlock(String[] args)`
    `protected void` | `handleMultiMapValues()`
    `protected void` | `handlePartitions(String[] args)`
    `protected void` | `handleQCapacity(String[] args)`
    `protected void` | `handleQOffer(String[] args)`
    `protected void` | `handleQOfferMany(String[] args)`
    `protected void` | `handleQPeek(String[] args)`
    `protected void` | `handleQPoll(String[] args)`
    `protected void` | `handleQPollMany(String[] args)`
    `protected void` | `handleQTake(String[] args)`
    `protected void` | `handleRemoveListener(String[] args)`
    `protected void` | `handleSetAdd(String[] args)`
    `protected void` | `handleSetAddMany(String[] args)`
    `protected void` | `handleSetRemove(String[] args)`
    `protected void` | `handleSetRemoveMany(String[] args)`
    `protected void` | `handleSize(String[] args)`
    `protected void` | `handleTopicPublish(String[] args)`
    `void` | `itemAdded(ItemEvent itemEvent)` Invoked when an item is added.
    `void` | `itemRemoved(ItemEvent itemEvent)` Invoked when an item is removed.
    `static void` | `main(String[] args)` Starts the test application.
    `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` | `onMessage(Message msg)` Invoked when a message is received for the added topic.
    `void` | `print(Object obj)`
    `void` | `println(Object obj)`
    `void` | `setHazelcast(HazelcastInstance hazelcast)`
    `void` | `start(String[] args)`
    `void` | `stop()`

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

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

- - ### Constructor Detail

    - #### ClientConsoleApp

          public ClientConsoleApp(HazelcastInstance hazelcast)

  - ### Method Detail

    - #### getQueue

          public IQueue<Object> getQueue()

    - #### getTopic

          public ITopic<Object> getTopic()

    - #### getMap

          public IMap<Object,Object> getMap()

    - #### getMultiMap

          public MultiMap<Object,Object> getMultiMap()

    - #### getAtomicNumber

          public IAtomicLong getAtomicNumber()

    - #### getSet

          public ISet<Object> getSet()

    - #### getList

          public IList<Object> getList()

    - #### setHazelcast

          public void setHazelcast(HazelcastInstance hazelcast)

    - #### stop

          public void stop()

    - #### start

          public void start(String[] args)

    - #### handleCommand

          protected void handleCommand(String commandInputted)

      Handle a command.

    - #### handlePartitions

          protected void handlePartitions(String[] args)

    - #### handleInstances

          protected void handleInstances(String[] args)

    - #### handleListContains

          protected void handleListContains(String[] args)

    - #### handleListRemove

          protected void handleListRemove(String[] args)

    - #### handleListAdd

          protected void handleListAdd(String[] args)

    - #### handleListSet

          protected void handleListSet(String[] args)

    - #### handleListAddMany

          protected void handleListAddMany(String[] args)

    - #### handleMapPut

          protected void handleMapPut(String[] args)

    - #### handleMapPutAsync

          protected void handleMapPutAsync(String[] args)

    - #### handleMapPutIfAbsent

          protected void handleMapPutIfAbsent(String[] args)

    - #### handleMapReplace

          protected void handleMapReplace(String[] args)

    - #### handleMapGet

          protected void handleMapGet(String[] args)

    - #### handleMapGetAsync

          protected void handleMapGetAsync(String[] args)

    - #### handleMapGetMapEntry

          protected void handleMapGetMapEntry(String[] args)

    - #### handleMapRemove

          protected void handleMapRemove(String[] args)

    - #### handleMapDelete

          protected void handleMapDelete(String[] args)

    - #### handleMapEvict

          protected void handleMapEvict(String[] args)

    - #### handleMapPutMany

          protected void handleMapPutMany(String[] args)

    - #### handleMapGetMany

          protected void handleMapGetMany(String[] args)

    - #### handleMapRemoveMany

          protected void handleMapRemoveMany(String[] args)

    - #### handleMapLock

          protected void handleMapLock(String[] args)

    - #### handleMapTryLock

          protected void handleMapTryLock(String[] args)

    - #### handleMapUnlock

          protected void handleMapUnlock(String[] args)

    - #### handleMapLocalKeys

          protected void handleMapLocalKeys()

    - #### handleMapLocalSize

          protected void handleMapLocalSize()

    - #### handleMapKeys

          protected void handleMapKeys()

    - #### handleMapEntries

          protected void handleMapEntries()

    - #### handleMapValues

          protected void handleMapValues()

    - #### handleMultiMapPut

          protected void handleMultiMapPut(String[] args)

    - #### handleMultiMapGet

          protected void handleMultiMapGet(String[] args)

    - #### handleMultiMapRemove

          protected void handleMultiMapRemove(String[] args)

    - #### handleMultiMapKeys

          protected void handleMultiMapKeys()

    - #### handleMultiMapEntries

          protected void handleMultiMapEntries()

    - #### handleMultiMapValues

          protected void handleMultiMapValues()

    - #### handleMultiMapLock

          protected void handleMultiMapLock(String[] args)

    - #### handleMultiMapTryLock

          protected void handleMultiMapTryLock(String[] args)

    - #### handleMultiMapUnlock

          protected void handleMultiMapUnlock(String[] args)

    - #### handleLock

          protected void handleLock(String[] args)

    - #### handleAddListener

          protected void handleAddListener(String[] args)

    - #### handleRemoveListener

          protected void handleRemoveListener(String[] args)

    - #### handleSetAdd

          protected void handleSetAdd(String[] args)

    - #### handleSetRemove

          protected void handleSetRemove(String[] args)

    - #### handleSetAddMany

          protected void handleSetAddMany(String[] args)

    - #### handleSetRemoveMany

          protected void handleSetRemoveMany(String[] args)

    - #### handleIterator

          protected void handleIterator(String[] args)

    - #### handleContains

          protected void handleContains(String[] args)

    - #### handleSize

          protected void handleSize(String[] args)

    - #### handleClear

          protected void handleClear(String[] args)

    - #### handleDestroy

          protected void handleDestroy(String[] args)

    - #### handleQOffer

          protected void handleQOffer(String[] args)

    - #### handleQTake

          protected void handleQTake(String[] args)

    - #### handleQPoll

          protected void handleQPoll(String[] args)

    - #### handleTopicPublish

          protected void handleTopicPublish(String[] args)

    - #### handleQOfferMany

          protected void handleQOfferMany(String[] args)

    - #### handleQPollMany

          protected void handleQPollMany(String[] args)

    - #### handleQPeek

          protected void handleQPeek(String[] args)

    - #### handleQCapacity

          protected void handleQCapacity(String[] args)

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

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

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

    - #### 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()`

    - #### 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()`

    - #### itemAdded

          public void itemAdded(ItemEvent itemEvent)

      Description copied from interface: `ItemListener`
      Invoked when an item is added.
      Specified by:
        `itemAdded` in interface `ItemListener`
      Parameters:
        `itemEvent` - the added item

    - #### itemRemoved

          public void itemRemoved(ItemEvent itemEvent)

      Description copied from interface: `ItemListener`
      Invoked when an item is removed.
      Specified by:
        `itemRemoved` in interface `ItemListener`
      Parameters:
        `itemEvent` - the removed item.

    - #### onMessage

          public void onMessage(Message msg)

      Description copied from interface: `MessageListener`
      Invoked when a message is received for the added topic. Note that topic guarantees message ordering. Therefore there is only one thread invoking onMessage. The user should not keep the thread busy, but preferably should dispatch it via an Executor. This will increase the performance of the topic.
      Specified by:
        `onMessage` in interface `MessageListener`
      Parameters:
        `msg` - the message that is received for the added topic

    - #### handleHelp

          protected void handleHelp(String command)

      Handles the help command.

    - #### println

          public void println(Object obj)

    - #### print

          public void print(Object obj)

    - #### main

          public static void main(String[] args)

      Starts the test application. Loads the config from classpath hazelcast.xml, if it fails to load, will use default config.

Copyright © 2019. All rights reserved.