Class ClientConsoleApp

java.lang.Object
com.hazelcast.client.console.ClientConsoleApp
All Implemented Interfaces:
ItemListener, EntryListener, EntryAddedListener, EntryEvictedListener, EntryExpiredListener, EntryRemovedListener, EntryUpdatedListener, MapClearedListener, MapEvictedListener, MapListener, MessageListener, 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 Details

  • Method Details

    • 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
    • entryExpired

      public void entryExpired​(EntryEvent event)
      Description copied from interface: EntryExpiredListener
      Invoked upon expiration of an entry.
      Specified by:
      entryExpired in interface EntryExpiredListener
      Parameters:
      event - the event invoked when an entry is expired.
    • 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.