Class ConsoleApp

java.lang.Object
com.hazelcast.console.ConsoleApp
All Implemented Interfaces:
ItemListener<Object>, EntryListener<Object,Object>, EntryAddedListener<Object,Object>, EntryEvictedListener<Object,Object>, EntryExpiredListener<Object,Object>, EntryRemovedListener<Object,Object>, EntryUpdatedListener<Object,Object>, MapClearedListener, MapEvictedListener, MapListener, MessageListener<Object>, EventListener

public class ConsoleApp extends Object implements EntryListener<Object,Object>, ItemListener<Object>, MessageListener<Object>
Special thanks to Alexandre Vasseur for providing this very nice test application.
  • 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()
    • stop

      public void stop()
    • start

      public void start() throws Exception
      Throws:
      Exception
    • handleCommand

      public void handleCommand(String inputCommand)
      Handles a command.
    • handleShutdown

      protected void handleShutdown()
    • handleExit

      protected void handleExit()
    • handlePartitions

      protected void handlePartitions()
    • handleInstances

      protected void handleInstances()
    • 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()
    • 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()
    • handleQCapacity

      protected void handleQCapacity()
    • entryAdded

      public void entryAdded(EntryEvent<Object,Object> event)
      Description copied from interface: EntryAddedListener
      Invoked upon addition of an entry.
      Specified by:
      entryAdded in interface EntryAddedListener<Object,Object>
      Parameters:
      event - the event invoked when an entry is added
    • entryRemoved

      public void entryRemoved(EntryEvent<Object,Object> event)
      Description copied from interface: EntryRemovedListener
      Invoked upon removal of an entry.
      Specified by:
      entryRemoved in interface EntryRemovedListener<Object,Object>
      Parameters:
      event - the event invoked when an entry is removed
    • entryUpdated

      public void entryUpdated(EntryEvent<Object,Object> event)
      Description copied from interface: EntryUpdatedListener
      Invoked upon update of an entry.
      Specified by:
      entryUpdated in interface EntryUpdatedListener<Object,Object>
      Parameters:
      event - the event invoked when an entry is updated
    • entryEvicted

      public void entryEvicted(EntryEvent<Object,Object> event)
      Description copied from interface: EntryEvictedListener
      Invoked upon eviction of an entry.
      Specified by:
      entryEvicted in interface EntryEvictedListener<Object,Object>
      Parameters:
      event - the event invoked when an entry is evicted
    • entryExpired

      public void entryExpired(EntryEvent<Object,Object> event)
      Description copied from interface: EntryExpiredListener
      Invoked upon expiration of an entry.
      Specified by:
      entryExpired in interface EntryExpiredListener<Object,Object>
      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<Object>
      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<Object>
      Parameters:
      itemEvent - the removed item.
    • onMessage

      public void onMessage(Message msg)
      Description copied from interface: MessageListener
      Invoked when a message is received for the topic. Note that the 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<Object>
      Parameters:
      msg - the message that is received for the topic
    • println

      public void println(Object obj)
    • print

      public void print(Object obj)
    • isRunning

      protected boolean isRunning()
    • create

      protected static ConsoleApp create()
    • main

      public static void main(String[] args) throws Exception
      Starts the test application.

      It loads the Hazelcast member configuration using the resolution logic as described in Hazelcast.newHazelcastInstance().

      Throws:
      Exception - in case of any exceptional case