Package org.apache.cassandra.transport
Class Server
- java.lang.Object
-
- org.apache.cassandra.transport.Server
-
- All Implemented Interfaces:
CassandraDaemon.Server
public class Server extends java.lang.Object implements CassandraDaemon.Server
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Server.Builder
static class
Server.ConnectionTracker
static class
Server.EventNotifier
-
Field Summary
Fields Modifier and Type Field Description java.net.InetSocketAddress
socket
EncryptionOptions.TlsEncryptionPolicy
tlsEncryptionPolicy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearConnectionHistory()
int
countConnectedClients()
java.util.Map<java.lang.String,java.lang.Integer>
countConnectedClientsByUser()
java.util.List<ConnectedClient>
getConnectedClients()
boolean
isRunning()
Returns whether the server is currently running.java.util.List<ClientStat>
recentClientStats()
void
start()
Start the server.void
stop()
Stop the server.
-
-
-
Field Detail
-
socket
public final java.net.InetSocketAddress socket
-
tlsEncryptionPolicy
public final EncryptionOptions.TlsEncryptionPolicy tlsEncryptionPolicy
-
-
Method Detail
-
stop
public void stop()
Description copied from interface:CassandraDaemon.Server
Stop the server. This method should be able to stop server started through start(). Should throw a RuntimeException if the server cannot be stopped- Specified by:
stop
in interfaceCassandraDaemon.Server
-
isRunning
public boolean isRunning()
Description copied from interface:CassandraDaemon.Server
Returns whether the server is currently running.- Specified by:
isRunning
in interfaceCassandraDaemon.Server
-
start
public void start()
Description copied from interface:CassandraDaemon.Server
Start the server. This method shoud be able to restart a server stopped through stop(). Should throw a RuntimeException if the server cannot be started- Specified by:
start
in interfaceCassandraDaemon.Server
-
countConnectedClients
public int countConnectedClients()
-
countConnectedClientsByUser
public java.util.Map<java.lang.String,java.lang.Integer> countConnectedClientsByUser()
-
getConnectedClients
public java.util.List<ConnectedClient> getConnectedClients()
-
recentClientStats
public java.util.List<ClientStat> recentClientStats()
-
clearConnectionHistory
public void clearConnectionHistory()
- Specified by:
clearConnectionHistory
in interfaceCassandraDaemon.Server
-
-