public class ConsoleListener extends Object
Constructor and Description |
---|
ConsoleListener(CacheSPI cache)
Constructor.
|
ConsoleListener(CacheSPI cache,
boolean startCache,
boolean stopCache)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
listen()
Instructs this class to listen for cache replication events.
|
void |
listen(boolean wait)
Instructs this class to listen for cache replication events.
|
static void |
main(String[] args)
The main method.
|
void |
printDetails(Event e) |
void |
printDetailsWithFqn(NodeEvent e) |
void |
printNewView(ViewChangedEvent e) |
public ConsoleListener(CacheSPI cache) throws Exception
cache
- the cache to monitor for replication events.Exception
public ConsoleListener(CacheSPI cache, boolean startCache, boolean stopCache) throws Exception
cache
- the cache to monitor for replication events.startCache
- indicates whether or not the cache should be started by
this class.stopCache
- indicates whether or not the cache should be stopped by
this class.Exception
public void listen() throws Exception
Exception
public void listen(boolean wait) throws Exception
wait
- whether or not this method should wait indefinately.
If this parameter is set to true
, using the
notify method of this class (using traditional Java thread
notification semantics) will cause this method to return.Exception
public void printDetails(Event e)
public void printDetailsWithFqn(NodeEvent e)
public void printNewView(ViewChangedEvent e)
public static void main(String[] args)
args
- command line arguments dictated by convention.
The first command line argument is the name of the
JBossCache
configuration file to be utilized
for configuration of the cache. Only the name of the
configuration file is necessary as it is read off of the
classpath.
If a configuration file is not specified on the command line,
jboss-cache.xml
will be the assumed file name.
All command line arguments after the first are ignored.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.