public class ConsoleApp extends Object implements EntryListener<Object,Object>, ItemListener<Object>, MessageListener<Object>
Constructor and Description |
---|
ConsoleApp(HazelcastInstance hazelcast,
PrintStream outOrig) |
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 |
entryExpired(EntryEvent<Object,Object> event)
Invoked upon expiration 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) |
void |
handleCommand(String inputCommand)
Handles a command.
|
protected void |
handleContains(String[] args) |
protected void |
handleDestroy(String[] args) |
protected void |
handleExit() |
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 |
handleShutdown() |
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 |
start() |
void |
stop() |
public ConsoleApp(HazelcastInstance hazelcast, PrintStream outOrig)
public IAtomicLong getAtomicNumber()
public void stop()
public void handleCommand(String inputCommand)
protected void handleShutdown()
protected void handleExit()
protected void handlePartitions(String[] args)
protected void handleInstances(String[] args)
protected void handleListContains(String[] args)
protected void handleListRemove(String[] args)
protected void handleListAdd(String[] args)
protected void handleListSet(String[] args)
protected void handleListAddMany(String[] args)
protected void handleMapPut(String[] args)
protected void handleMapPutAsync(String[] args)
protected void handleMapPutIfAbsent(String[] args)
protected void handleMapReplace(String[] args)
protected void handleMapGet(String[] args)
protected void handleMapGetAsync(String[] args)
protected void handleMapGetMapEntry(String[] args)
protected void handleMapRemove(String[] args)
protected void handleMapDelete(String[] args)
protected void handleMapEvict(String[] args)
protected void handleMapPutMany(String[] args)
protected void handleMapGetMany(String[] args)
protected void handleMapRemoveMany(String[] args)
protected void handleMapLock(String[] args)
protected void handleMapTryLock(String[] args)
protected void handleMapUnlock(String[] args)
protected void handleMapLocalKeys()
protected void handleMapLocalSize()
protected void handleMapKeys()
protected void handleMapEntries()
protected void handleMapValues()
protected void handleMultiMapPut(String[] args)
protected void handleMultiMapGet(String[] args)
protected void handleMultiMapRemove(String[] args)
protected void handleMultiMapKeys()
protected void handleMultiMapEntries()
protected void handleMultiMapValues()
protected void handleMultiMapLock(String[] args)
protected void handleMultiMapTryLock(String[] args)
protected void handleMultiMapUnlock(String[] args)
protected void handleLock(String[] args)
protected void handleAddListener(String[] args)
protected void handleRemoveListener(String[] args)
protected void handleSetAdd(String[] args)
protected void handleSetRemove(String[] args)
protected void handleSetAddMany(String[] args)
protected void handleSetRemoveMany(String[] args)
protected void handleIterator(String[] args)
protected void handleContains(String[] args)
protected void handleSize(String[] args)
protected void handleClear(String[] args)
protected void handleDestroy(String[] args)
protected void handleQOffer(String[] args)
protected void handleQTake(String[] args)
protected void handleQPoll(String[] args)
protected void handleTopicPublish(String[] args)
protected void handleQOfferMany(String[] args)
protected void handleQPollMany(String[] args)
protected void handleQPeek(String[] args)
protected void handleQCapacity(String[] args)
public void entryAdded(EntryEvent event)
EntryAddedListener
entryAdded
in interface EntryAddedListener<Object,Object>
event
- the event invoked when an entry is addedpublic void entryRemoved(EntryEvent event)
EntryRemovedListener
entryRemoved
in interface EntryRemovedListener<Object,Object>
event
- the event invoked when an entry is removedpublic void entryUpdated(EntryEvent event)
EntryUpdatedListener
entryUpdated
in interface EntryUpdatedListener<Object,Object>
event
- the event invoked when an entry is updatedpublic void entryEvicted(EntryEvent event)
EntryEvictedListener
entryEvicted
in interface EntryEvictedListener<Object,Object>
event
- the event invoked when an entry is evictedpublic void entryExpired(EntryEvent<Object,Object> event)
EntryExpiredListener
entryExpired
in interface EntryExpiredListener<Object,Object>
event
- the event invoked when an entry is expired.public void mapEvicted(MapEvent event)
MapEvictedListener
IMap.evictAll()
.mapEvicted
in interface MapEvictedListener
event
- the map event invoked when all entries are evicted by IMap.evictAll()
public void mapCleared(MapEvent event)
MapClearedListener
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.mapCleared
in interface MapClearedListener
event
- the map event invoked when all entries are removed by IMap.clear()
public void itemAdded(ItemEvent itemEvent)
ItemListener
itemAdded
in interface ItemListener<Object>
itemEvent
- the added itempublic void itemRemoved(ItemEvent itemEvent)
ItemListener
itemRemoved
in interface ItemListener<Object>
itemEvent
- the removed item.public void onMessage(Message msg)
MessageListener
onMessage
in interface MessageListener<Object>
msg
- the message that is received for the added topicpublic void println(Object obj)
public void print(Object obj)
public static void main(String[] args) throws Exception
It loads the Hazelcast member configuration using the resolution logic as described in
Hazelcast.newHazelcastInstance()
.
Exception
- in case of any exceptional caseCopyright © 2020 Hazelcast, Inc.. All rights reserved.