Package org.apache.cassandra.service
Class CassandraDaemon
java.lang.Object
org.apache.cassandra.service.CassandraDaemon
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic Runnableprotected final StartupChecks -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()A convenience method to initialize and start the daemon in one shot.voidvoidvoidvoidA convenience method to stop and destroy the daemon in one shot.voiddestroy()Clean up all resources obtained during the lifetime of the daemon.voidstatic CassandraDaemonvoidInitialize the Cassandra Daemon based on the given Commons Daemon-specific arguments.voidbooleanstatic voidlogSystemInfo(org.slf4j.Logger logger) static voidvoidChecks if the data of the local system keyspaces need to be migrated to a different location.static voidvoidvoidprotected voidsetup()This is a hook for concrete daemons to initialize themselves suitably.booleanvoidvoidstart()Start the Cassandra Daemon, assuming that it has already been initialized viainit(String[])Hook for JSVCvoidvoidstop()Stop the daemon, ideally in an idempotent manner.static voidvoidDeprecated.voidstopNativeTransport(boolean force) void
-
Field Details
-
MBEAN_NAME
- See Also:
-
SPECULATION_THRESHOLD_UPDATER
-
startupChecks
-
-
Constructor Details
-
CassandraDaemon
public CassandraDaemon() -
CassandraDaemon
public CassandraDaemon(boolean runManaged)
-
-
Method Details
-
getInstanceForTesting
-
nativeTransportService
-
setup
protected void setup()This is a hook for concrete daemons to initialize themselves suitably. Subclasses should override this to finish the job (listening on ports, etc.) -
runStartupChecks
public void runStartupChecks() -
migrateSystemDataIfNeeded
Checks if the data of the local system keyspaces need to be migrated to a different location.- Throws:
IOException
-
setupVirtualKeyspaces
public void setupVirtualKeyspaces() -
scrubDataDirectories
- Throws:
StartupException
-
initializeClientTransports
public void initializeClientTransports() -
completeSetup
public void completeSetup() -
setupCompleted
public boolean setupCompleted() -
logSystemInfo
public static void logSystemInfo(org.slf4j.Logger logger) -
init
Initialize the Cassandra Daemon based on the given Commons Daemon-specific arguments. To clarify, this is a hook for JSVC.- Parameters:
arguments- the arguments passed in from JSVC- Throws:
IOException
-
start
public void start()Start the Cassandra Daemon, assuming that it has already been initialized viainit(String[])Hook for JSVC -
stop
public void stop()Stop the daemon, ideally in an idempotent manner. Hook for JSVC / Procrun -
destroyClientTransports
public void destroyClientTransports() -
destroy
public void destroy()Clean up all resources obtained during the lifetime of the daemon. This is a hook for JSVC. -
activate
public void activate()A convenience method to initialize and start the daemon in one shot. -
registerNativeAccess
- Throws:
NotCompliantMBeanException
-
applyConfig
public void applyConfig() -
validateTransportsCanStart
public void validateTransportsCanStart() -
startNativeTransport
public void startNativeTransport() -
stopNativeTransport
Deprecated. -
stopNativeTransport
public void stopNativeTransport(boolean force) -
isNativeTransportRunning
public boolean isNativeTransportRunning() -
deactivate
public void deactivate()A convenience method to stop and destroy the daemon in one shot. -
stop
-
main
-
clearConnectionHistory
public void clearConnectionHistory()
-