|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.service.AbstractCassandraDaemon
public abstract class AbstractCassandraDaemon
The CassandraDaemon is an abstraction for a Cassandra daemon
service, which defines not only a way to activate and deactivate it, but also
hooks into its lifecycle methods (see setup(), start(),
stop() and setup()).
| Nested Class Summary | |
|---|---|
static class |
AbstractCassandraDaemon.CleaningThreadPool
A subclass of Java's ThreadPoolExecutor which implements Jetty's ThreadPool interface (for integration with Avro), and performs ClientState cleanup. |
| Field Summary | |
|---|---|
protected java.net.InetAddress |
listenAddr
|
protected int |
listenPort
|
static int |
MIN_WORKER_THREADS
|
| Constructor Summary | |
|---|---|
AbstractCassandraDaemon()
|
|
| Method Summary | |
|---|---|
void |
activate()
A convenience method to initialize and start the daemon in one shot. |
void |
deactivate()
A convenience method to stop and destroy the daemon in one shot. |
void |
destroy()
Clean up all resources obtained during the lifetime of the daemon. |
void |
init(java.lang.String[] arguments)
Initialize the Cassandra Daemon based on the given Commons Daemon-specific arguments. |
protected void |
setup()
This is a hook for concrete daemons to initialize themselves suitably. |
abstract void |
start()
Start the Cassandra Daemon, assuming that it has already been initialized, via either init(String[]) or
#load(String[]). |
abstract void |
stop()
Stop the daemon, ideally in an idempotent manner. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.net.InetAddress listenAddr
protected int listenPort
public static final int MIN_WORKER_THREADS
| Constructor Detail |
|---|
public AbstractCassandraDaemon()
| Method Detail |
|---|
protected void setup()
throws java.io.IOException
java.io.IOException
public void init(java.lang.String[] arguments)
throws java.io.IOException
init in interface CassandraDaemonarguments - the arguments passed in from JSVC
java.io.IOException
public abstract void start()
throws java.io.IOException
init(String[]) or
#load(String[]).
start in interface CassandraDaemonjava.io.IOExceptionpublic abstract void stop()
stop in interface CassandraDaemonpublic void destroy()
destroy in interface CassandraDaemonpublic void activate()
activate in interface CassandraDaemonpublic void deactivate()
deactivate in interface CassandraDaemon
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||