Package com.hazelcast.console
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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static ConsoleAppcreate()voidentryAdded(EntryEvent<Object, Object> event) Invoked upon addition of an entry.voidentryEvicted(EntryEvent<Object, Object> event) Invoked upon eviction of an entry.voidentryExpired(EntryEvent<Object, Object> event) Invoked upon expiration of an entry.voidentryRemoved(EntryEvent<Object, Object> event) Invoked upon removal of an entry.voidentryUpdated(EntryEvent<Object, Object> event) Invoked upon update of an entry.getList()getMap()getQueue()getSet()getTopic()protected voidhandleAddListener(String[] args) protected voidhandleClear(String[] args) voidhandleCommand(String inputCommand) Handles a command.protected voidhandleContains(String[] args) protected voidhandleDestroy(String[] args) protected voidprotected voidprotected voidhandleIterator(String[] args) protected voidhandleListAdd(String[] args) protected voidhandleListAddMany(String[] args) protected voidhandleListContains(String[] args) protected voidhandleListRemove(String[] args) protected voidhandleListSet(String[] args) protected voidhandleLock(String[] args) protected voidhandleMapDelete(String[] args) protected voidprotected voidhandleMapEvict(String[] args) protected voidhandleMapGet(String[] args) protected voidhandleMapGetAsync(String[] args) protected voidhandleMapGetMany(String[] args) protected voidhandleMapGetMapEntry(String[] args) protected voidprotected voidprotected voidprotected voidhandleMapLock(String[] args) protected voidhandleMapPut(String[] args) protected voidhandleMapPutAsync(String[] args) protected voidhandleMapPutIfAbsent(String[] args) protected voidhandleMapPutMany(String[] args) protected voidhandleMapRemove(String[] args) protected voidhandleMapRemoveMany(String[] args) protected voidhandleMapReplace(String[] args) protected voidhandleMapTryLock(String[] args) protected voidhandleMapUnlock(String[] args) protected voidprotected voidprotected voidhandleMultiMapGet(String[] args) protected voidprotected voidhandleMultiMapLock(String[] args) protected voidhandleMultiMapPut(String[] args) protected voidhandleMultiMapRemove(String[] args) protected voidhandleMultiMapTryLock(String[] args) protected voidhandleMultiMapUnlock(String[] args) protected voidprotected voidprotected voidprotected voidhandleQOffer(String[] args) protected voidhandleQOfferMany(String[] args) protected voidprotected voidhandleQPoll(String[] args) protected voidhandleQPollMany(String[] args) protected voidprotected voidhandleRemoveListener(String[] args) protected voidhandleSetAdd(String[] args) protected voidhandleSetAddMany(String[] args) protected voidhandleSetRemove(String[] args) protected voidhandleSetRemoveMany(String[] args) protected voidprotected voidhandleSize(String[] args) protected voidhandleTopicPublish(String[] args) protected booleanvoidInvoked when an item is added.voiditemRemoved(ItemEvent itemEvent) Invoked when an item is removed.static voidStarts the test application.voidmapCleared(MapEvent event) Invoked when all entries are removed byIMap.clear().voidmapEvicted(MapEvent event) Invoked when all entries are evicted byIMap.evictAll().voidInvoked when a message is received for the topic.voidvoidvoidstart()voidstop()
- 
Constructor Details- 
ConsoleApp
 
- 
- 
Method Details- 
getQueue
- 
getTopic
- 
getMap
- 
getMultiMap
- 
getAtomicNumber
- 
getSet
- 
getList
- 
stoppublic void stop()
- 
start- Throws:
- Exception
 
- 
handleCommandHandles a command.
- 
handleShutdownprotected void handleShutdown()
- 
handleExitprotected void handleExit()
- 
handlePartitionsprotected void handlePartitions()
- 
handleInstancesprotected void handleInstances()
- 
handleListContains
- 
handleListRemove
- 
handleListAdd
- 
handleListSet
- 
handleListAddMany
- 
handleMapPut
- 
handleMapPutAsync
- 
handleMapPutIfAbsent
- 
handleMapReplace
- 
handleMapGet
- 
handleMapGetAsync
- 
handleMapGetMapEntry
- 
handleMapRemove
- 
handleMapDelete
- 
handleMapEvict
- 
handleMapPutMany
- 
handleMapGetMany
- 
handleMapRemoveMany
- 
handleMapLock
- 
handleMapTryLock
- 
handleMapUnlock
- 
handleMapLocalKeysprotected void handleMapLocalKeys()
- 
handleMapLocalSizeprotected void handleMapLocalSize()
- 
handleMapKeysprotected void handleMapKeys()
- 
handleMapEntriesprotected void handleMapEntries()
- 
handleMapValuesprotected void handleMapValues()
- 
handleMultiMapPut
- 
handleMultiMapGet
- 
handleMultiMapRemove
- 
handleMultiMapKeysprotected void handleMultiMapKeys()
- 
handleMultiMapEntriesprotected void handleMultiMapEntries()
- 
handleMultiMapValuesprotected void handleMultiMapValues()
- 
handleMultiMapLock
- 
handleMultiMapTryLock
- 
handleMultiMapUnlock
- 
handleLock
- 
handleAddListener
- 
handleRemoveListener
- 
handleSetAdd
- 
handleSetRemove
- 
handleSetAddMany
- 
handleSetRemoveMany
- 
handleIterator
- 
handleContains
- 
handleSize
- 
handleClear
- 
handleDestroy
- 
handleQOffer
- 
handleQTakeprotected void handleQTake()
- 
handleQPoll
- 
handleTopicPublish
- 
handleQOfferMany
- 
handleQPollMany
- 
handleQPeekprotected void handleQPeek()
- 
handleQCapacityprotected void handleQCapacity()
- 
entryAddedDescription copied from interface:EntryAddedListenerInvoked upon addition of an entry.- Specified by:
- entryAddedin interface- EntryAddedListener<Object,- Object> 
- Parameters:
- event- the event invoked when an entry is added
 
- 
entryRemovedDescription copied from interface:EntryRemovedListenerInvoked upon removal of an entry.- Specified by:
- entryRemovedin interface- EntryRemovedListener<Object,- Object> 
- Parameters:
- event- the event invoked when an entry is removed
 
- 
entryUpdatedDescription copied from interface:EntryUpdatedListenerInvoked upon update of an entry.- Specified by:
- entryUpdatedin interface- EntryUpdatedListener<Object,- Object> 
- Parameters:
- event- the event invoked when an entry is updated
 
- 
entryEvictedDescription copied from interface:EntryEvictedListenerInvoked upon eviction of an entry.- Specified by:
- entryEvictedin interface- EntryEvictedListener<Object,- Object> 
- Parameters:
- event- the event invoked when an entry is evicted
 
- 
entryExpiredDescription copied from interface:EntryExpiredListenerInvoked upon expiration of an entry.- Specified by:
- entryExpiredin interface- EntryExpiredListener<Object,- Object> 
- Parameters:
- event- the event invoked when an entry is expired.
 
- 
mapEvictedDescription copied from interface:MapEvictedListenerInvoked when all entries are evicted byIMap.evictAll().- Specified by:
- mapEvictedin interface- MapEvictedListener
- Parameters:
- event- the map event invoked when all entries are evicted by- IMap.evictAll()
 
- 
mapClearedDescription copied from interface:MapClearedListenerInvoked when all entries are removed byIMap.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:
- mapClearedin interface- MapClearedListener
- Parameters:
- event- the map event invoked when all entries are removed by- IMap.clear()
 
- 
itemAddedDescription copied from interface:ItemListenerInvoked when an item is added.- Specified by:
- itemAddedin interface- ItemListener<Object>
- Parameters:
- itemEvent- the added item
 
- 
itemRemovedDescription copied from interface:ItemListenerInvoked when an item is removed.- Specified by:
- itemRemovedin interface- ItemListener<Object>
- Parameters:
- itemEvent- the removed item.
 
- 
onMessageDescription copied from interface:MessageListenerInvoked 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:
- onMessagein interface- MessageListener<Object>
- Parameters:
- msg- the message that is received for the topic
 
- 
println
- 
print
- 
isRunningprotected boolean isRunning()
- 
create
- 
mainStarts 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
 
 
-