public final class DefaultEntityConnectionServerAdmin extends java.rmi.server.UnicastRemoteObject implements EntityConnectionServerAdmin
EntityConnectionServerAdmin.GcEvent, EntityConnectionServerAdmin.ThreadStatistics
Constructor and Description |
---|
DefaultEntityConnectionServerAdmin(DefaultEntityConnectionServer server,
java.lang.Integer serverAdminPort)
Instantiates a new DefaultEntityConnectionServerAdmin
|
Modifier and Type | Method and Description |
---|---|
void |
disconnect(java.util.UUID clientId)
Unregisters the connection from the server, if connection pooling is enabled
for the user the connection is pooled.
|
int |
getActiveConnectionCount() |
long |
getAllocatedMemory() |
ClientLog |
getClientLog(java.util.UUID clientId) |
java.util.Collection<RemoteClient> |
getClients() |
java.util.Collection<RemoteClient> |
getClients(java.lang.String clientTypeId) |
java.util.Collection<RemoteClient> |
getClients(User user) |
java.util.Collection<java.lang.String> |
getClientTypes() |
int |
getConnectionCount() |
int |
getConnectionLimit() |
int |
getConnectionPoolCleanupInterval(User user) |
java.util.List<User> |
getConnectionPools() |
ConnectionPoolStatistics |
getConnectionPoolStatistics(User user,
long since) |
int |
getConnectionTimeout()
Returns the connection timeout in ms
|
Database.Statistics |
getDatabaseStatistics() |
java.lang.String |
getDatabaseURL() |
java.util.Map<java.lang.String,java.lang.String> |
getEntityDefinitions() |
java.util.List<EntityConnectionServerAdmin.GcEvent> |
getGcEvents(long since) |
java.lang.Object |
getLoggingLevel() |
int |
getMaintenanceInterval() |
int |
getMaximumConnectionPoolSize(User user) |
int |
getMaximumPoolCheckOutTime(User user) |
int |
getMaximumPoolRetryWaitPeriod(User user) |
long |
getMaxMemory() |
int |
getMinimumConnectionPoolSize(User user) |
int |
getPoolConnectionThreshold(User user) |
int |
getPooledConnectionTimeout(User user) |
double |
getProcessCpuLoad() |
int |
getRequestsPerSecond() |
Server.ServerInfo |
getServerInfo() |
double |
getSystemCpuLoad() |
java.lang.String |
getSystemProperties() |
EntityConnectionServerAdmin.ThreadStatistics |
getThreadStatistics() |
long |
getUsedMemory() |
java.util.Collection<User> |
getUsers() |
boolean |
isCollectFineGrainedPoolStatistics(User user) |
boolean |
isLoggingEnabled(java.util.UUID clientId)
Returns true if logging is enabled for the given connection
|
void |
removeConnections(boolean timedOutOnly)
Removes connections.
|
void |
resetConnectionPoolStatistics(User user)
Resets the statistics that have been collected so far
|
void |
setCollectFineGrainedPoolStatistics(User user,
boolean value) |
void |
setConnectionLimit(int value) |
void |
setConnectionPoolCleanupInterval(User user,
int poolCleanupInterval) |
void |
setConnectionTimeout(int timeout)
Sets the connection timeout in ms
|
void |
setLoggingEnabled(java.util.UUID clientId,
boolean status)
Sets the logging status for the given connection
|
void |
setLoggingLevel(java.lang.Object level) |
void |
setMaintenanceInterval(int interval) |
void |
setMaximumConnectionPoolSize(User user,
int value) |
void |
setMaximumPoolCheckOutTime(User user,
int value) |
void |
setMaximumPoolRetryWaitPeriod(User user,
int value) |
void |
setMinimumConnectionPoolSize(User user,
int value) |
void |
setPoolConnectionThreshold(User user,
int value) |
void |
setPooledConnectionTimeout(User user,
int timeout) |
void |
shutdown()
Shuts down the server
|
clone, exportObject, exportObject, exportObject, unexportObject
public DefaultEntityConnectionServerAdmin(DefaultEntityConnectionServer server, java.lang.Integer serverAdminPort) throws java.rmi.RemoteException
server
- the server to administerserverAdminPort
- the port on which to make the server admin availablejava.rmi.RemoteException
- in case of an exceptionjava.lang.NullPointerException
- in case serverAdminPort
or server
are not specifiedpublic Server.ServerInfo getServerInfo()
getServerInfo
in interface EntityConnectionServerAdmin
public java.lang.String getSystemProperties()
getSystemProperties
in interface EntityConnectionServerAdmin
public java.util.List<EntityConnectionServerAdmin.GcEvent> getGcEvents(long since)
getGcEvents
in interface EntityConnectionServerAdmin
since
- the time since from which to get gc eventspublic EntityConnectionServerAdmin.ThreadStatistics getThreadStatistics() throws java.rmi.RemoteException
getThreadStatistics
in interface EntityConnectionServerAdmin
java.rmi.RemoteException
- in case of an exceptionpublic java.lang.String getDatabaseURL()
getDatabaseURL
in interface EntityConnectionServerAdmin
public java.lang.Object getLoggingLevel()
getLoggingLevel
in interface EntityConnectionServerAdmin
public void setLoggingLevel(java.lang.Object level)
setLoggingLevel
in interface EntityConnectionServerAdmin
level
- the logging levelpublic java.util.Collection<User> getUsers() throws java.rmi.RemoteException
getUsers
in interface EntityConnectionServerAdmin
java.rmi.RemoteException
- in case of a communication errorpublic java.util.Collection<RemoteClient> getClients(User user) throws java.rmi.RemoteException
getClients
in interface EntityConnectionServerAdmin
user
- the user for which to retrieve the clientsjava.rmi.RemoteException
- in case of a communication errorpublic java.util.Collection<RemoteClient> getClients(java.lang.String clientTypeId)
getClients
in interface EntityConnectionServerAdmin
clientTypeId
- the client type for which to retrieve the clientspublic java.util.Collection<RemoteClient> getClients()
getClients
in interface EntityConnectionServerAdmin
public java.util.Collection<java.lang.String> getClientTypes()
getClientTypes
in interface EntityConnectionServerAdmin
public void disconnect(java.util.UUID clientId) throws java.rmi.RemoteException
disconnect
in interface EntityConnectionServerAdmin
clientId
- the ID of the clientjava.rmi.RemoteException
- in case of a communication errorpublic void shutdown() throws java.rmi.RemoteException
shutdown
in interface EntityConnectionServerAdmin
java.rmi.RemoteException
- in case of a communication errorpublic int getActiveConnectionCount()
getActiveConnectionCount
in interface EntityConnectionServerAdmin
public int getMaintenanceInterval()
getMaintenanceInterval
in interface EntityConnectionServerAdmin
public void setMaintenanceInterval(int interval)
setMaintenanceInterval
in interface EntityConnectionServerAdmin
interval
- the number of ms that should pass between maintenance cycles,
that is, when inactive clients are purgedpublic void removeConnections(boolean timedOutOnly) throws java.rmi.RemoteException
removeConnections
in interface EntityConnectionServerAdmin
timedOutOnly
- if true only connections that have timed out are culledjava.rmi.RemoteException
- in case of an exceptionpublic void resetConnectionPoolStatistics(User user)
resetConnectionPoolStatistics
in interface EntityConnectionServerAdmin
user
- the pool userpublic boolean isCollectFineGrainedPoolStatistics(User user)
isCollectFineGrainedPoolStatistics
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setCollectFineGrainedPoolStatistics(User user, boolean value)
setCollectFineGrainedPoolStatistics
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- true if fine grained statistics should be collected for the given connection poolpublic int getRequestsPerSecond()
getRequestsPerSecond
in interface EntityConnectionServerAdmin
public ConnectionPoolStatistics getConnectionPoolStatistics(User user, long since)
getConnectionPoolStatistics
in interface EntityConnectionServerAdmin
user
- the pool usersince
- the time since from which to retrieve pool statisticspublic Database.Statistics getDatabaseStatistics()
getDatabaseStatistics
in interface EntityConnectionServerAdmin
public java.util.List<User> getConnectionPools()
getConnectionPools
in interface EntityConnectionServerAdmin
public int getConnectionPoolCleanupInterval(User user)
getConnectionPoolCleanupInterval
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setConnectionPoolCleanupInterval(User user, int poolCleanupInterval)
setConnectionPoolCleanupInterval
in interface EntityConnectionServerAdmin
user
- the pool userpoolCleanupInterval
- the pool cleanup interval in mspublic int getMaximumConnectionPoolSize(User user)
getMaximumConnectionPoolSize
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setMaximumConnectionPoolSize(User user, int value)
setMaximumConnectionPoolSize
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- the maximum connection pool sizepublic int getMinimumConnectionPoolSize(User user)
getMinimumConnectionPoolSize
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setMinimumConnectionPoolSize(User user, int value)
setMinimumConnectionPoolSize
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- the minimum connection pool sizepublic int getPoolConnectionThreshold(User user)
getPoolConnectionThreshold
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setPoolConnectionThreshold(User user, int value)
setPoolConnectionThreshold
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- the number of milliseconds to wait before trying to create a new connectionpublic int getPooledConnectionTimeout(User user)
getPooledConnectionTimeout
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setPooledConnectionTimeout(User user, int timeout)
setPooledConnectionTimeout
in interface EntityConnectionServerAdmin
user
- the pool usertimeout
- the pooled connection timeout in mspublic int getMaximumPoolRetryWaitPeriod(User user)
getMaximumPoolRetryWaitPeriod
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setMaximumPoolRetryWaitPeriod(User user, int value)
setMaximumPoolRetryWaitPeriod
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- the maximum time to wait between check out retries in mspublic int getMaximumPoolCheckOutTime(User user)
getMaximumPoolCheckOutTime
in interface EntityConnectionServerAdmin
user
- the pool userpublic void setMaximumPoolCheckOutTime(User user, int value)
setMaximumPoolCheckOutTime
in interface EntityConnectionServerAdmin
user
- the pool uservalue
- the maximum time in ms to retry checking out a connection before throwing an exceptionpublic long getAllocatedMemory()
getAllocatedMemory
in interface EntityConnectionServerAdmin
public long getUsedMemory()
getUsedMemory
in interface EntityConnectionServerAdmin
public long getMaxMemory()
getMaxMemory
in interface EntityConnectionServerAdmin
public double getSystemCpuLoad() throws java.rmi.RemoteException
getSystemCpuLoad
in interface EntityConnectionServerAdmin
java.rmi.RemoteException
- in case of a communication errorOperatingSystemMXBean.getSystemCpuLoad()
public double getProcessCpuLoad() throws java.rmi.RemoteException
getProcessCpuLoad
in interface EntityConnectionServerAdmin
java.rmi.RemoteException
- in case of a communication errorOperatingSystemMXBean.getProcessCpuLoad()
public int getConnectionCount()
getConnectionCount
in interface EntityConnectionServerAdmin
public int getConnectionLimit()
getConnectionLimit
in interface EntityConnectionServerAdmin
public void setConnectionLimit(int value)
setConnectionLimit
in interface EntityConnectionServerAdmin
value
- the maximum number of concurrent connections this servers acceptspublic ClientLog getClientLog(java.util.UUID clientId)
getClientLog
in interface EntityConnectionServerAdmin
clientId
- the ID of the client for which to retrieve the logpublic boolean isLoggingEnabled(java.util.UUID clientId)
isLoggingEnabled
in interface EntityConnectionServerAdmin
clientId
- the ID of the clientpublic void setLoggingEnabled(java.util.UUID clientId, boolean status)
setLoggingEnabled
in interface EntityConnectionServerAdmin
clientId
- the ID of the clientstatus
- the new logging statuspublic int getConnectionTimeout()
getConnectionTimeout
in interface EntityConnectionServerAdmin
public void setConnectionTimeout(int timeout)
setConnectionTimeout
in interface EntityConnectionServerAdmin
timeout
- the timeout in mspublic java.util.Map<java.lang.String,java.lang.String> getEntityDefinitions()
getEntityDefinitions
in interface EntityConnectionServerAdmin