Interface Cassandra
-
public interface CassandraSimple interface that allows theCassandrato bestartedandstopped.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()Gets theSettingsof thisCassandrainstance.VersiongetVersion()Gets theVersionof thisCassandrainstance.PathgetWorkingDirectory()Gets the working directory.booleanisRunning()Checks whether this Cassandra is running.voidstart()Starts theCassandra.voidstop()Stops theCassandra.
-
-
-
Method Detail
-
start
void start() throws CassandraExceptionStarts theCassandra. Calling this method on an already startedCassandrahas no effect. Causes the current thread to wait, until theCassandrahas started.- Throws:
CassandraException- if theCassandracannot be started
-
stop
void stop() throws CassandraException
Stops theCassandra. Calling this method on an already stoppedCassandrahas no effect. Causes the current thread to wait, until theCassandrahas stopped.- Throws:
CassandraException- if theCassandracannot be stopped
-
isRunning
boolean isRunning()
Checks whether this Cassandra is running.- Returns:
trueif the Cassandra is running
-
getName
String getName()
Gets the name of thisCassandrainstance.- Returns:
- a name, never
null
-
getVersion
Version getVersion()
Gets theVersionof thisCassandrainstance.- Returns:
- a version, never
null
-
getWorkingDirectory
Path getWorkingDirectory()
Gets the working directory.- Returns:
- working directory, never
null
-
getSettings
Settings getSettings() throws IllegalStateException
Gets theSettingsof thisCassandrainstance. The settings can be obtained only if Cassandra was successfully started. Causes the current thread to wait, until either theCassandrahas started or stopped.- Returns:
- the settings
- Throws:
IllegalStateException- if Cassandra was not started
-
-