Interface Cassandra
-
public interface CassandraA simple interface that allowsCassandrato bestartedandstopped.Refer to the package overview for more information.
- Since:
- 4.0.0
- Author:
- Dmytro Nosan
- See Also:
CassandraBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetName()Gets the name of thisCassandrainstance.SettingsgetSettings()Retrieves theSettingsof thisCassandrainstance.VersiongetVersion()Retrieves theVersionof thisCassandrainstance.PathgetWorkingDirectory()Retrieves the working directory of thisCassandrainstance.booleanisRunning()Checks whether thisCassandrainstance is running.voidstart()StartsCassandra.voidstop()StopsCassandra.
-
-
-
Method Detail
-
start
void start() throws CassandraExceptionStartsCassandra. Calling this method on an already startedCassandrahas no effect. Causes the current thread to wait untilCassandrahas started.- Throws:
CassandraException- ifCassandracannot be started
-
stop
void stop() throws CassandraException
StopsCassandra. Calling this method on an already stoppedCassandrahas no effect. Causes the current thread to wait untilCassandrahas stopped.- Throws:
CassandraException- ifCassandracannot be stopped
-
isRunning
boolean isRunning()
Checks whether thisCassandrainstance is running.- Returns:
trueifCassandrais running, otherwisefalse
-
getName
String getName()
Gets the name of thisCassandrainstance.- Returns:
- the name of the instance, never
null
-
getVersion
Version getVersion()
Retrieves theVersionof thisCassandrainstance.- Returns:
- the version of the instance, never
null
-
getWorkingDirectory
Path getWorkingDirectory()
Retrieves the working directory of thisCassandrainstance.- Returns:
- the working directory, never
null
-
getSettings
Settings getSettings() throws IllegalStateException
Retrieves theSettingsof thisCassandrainstance. The settings can only be obtained ifCassandrawas successfully started. Causes the current thread to wait untilCassandrahas either started or stopped.- Returns:
- the settings of the instance
- Throws:
IllegalStateException- ifCassandrawas not started
-
-