public class MaxSession
extends java.lang.Object
Constructor and Description |
---|
MaxSession() |
Modifier and Type | Method and Description |
---|---|
static void |
addServerToMaxSession(java.sql.Connection con,
long sessionId,
java.lang.String userId,
java.lang.String serverHost,
java.lang.String serverName,
int tenantId)
Adds an entry for the server in MaxSession table
|
static void |
deleteAllRowsForServer(java.sql.Connection con,
java.lang.String serverName,
java.lang.String serverHost)
Delete all the rows for the server.
|
static java.util.Vector |
getAllServerNames(java.sql.Connection con)
Get name,host and sessionid for all servers
|
static java.util.Vector |
getAllServerNamesWithTimestamp(java.sql.Connection con)
Get name,host and sessionid for all servers
|
static java.util.Vector |
getAllServersInfo(java.sql.Connection con)
Get name,host and sessionid for all servers
|
static java.util.List<java.lang.Integer> |
getAllTeanants(java.sql.Connection con)
Get name,host and sessionid for all servers
|
static java.util.Map<java.lang.Integer,java.lang.String> |
getAllTenantsServerInfo(java.sql.Connection con,
java.lang.String serverHost,
java.lang.String serverName)
Get name,host and sessionid for server
|
static java.lang.String |
getNewReloadCacheForOwnerServer(java.lang.String dbReloadCache,
java.lang.String cacheName)
Get the new reloadcache value
|
static java.lang.String |
getServerInfo(java.sql.Connection con,
java.lang.String serverHost,
java.lang.String serverName)
Get name,host and sessionid for server
|
static java.util.List<java.lang.Integer> |
getTenantList(java.sql.Connection con,
java.lang.String serverName,
java.lang.String serverHost)
Get name,host and sessionid for server
|
static void |
removeDeadTenantSession(java.sql.Connection con)
Remove server session rows if server is not running for 60 min.
|
static void |
unlockRecords(java.sql.Connection con,
java.lang.String serverName,
java.lang.String serverHost) |
static int |
updateExecute(java.sql.Connection con,
java.lang.String serverHost,
java.lang.String serverName,
java.lang.String newCacheValue,
java.lang.String oldValue,
boolean updateHeartbeat)
Update tenantsession.reloadcache with new value.
|
static void |
updateMaxSessionTimestamp(java.sql.Connection con,
java.lang.String serverHost,
java.lang.String serverName)
Update maxsession.timestamp.
|
static void |
updateReloadCache(java.sql.Connection con,
java.lang.String serverName,
java.lang.String serverHost,
java.lang.String reload,
boolean updateAllServers)
Update the reload cache for the server.
|
public static void addServerToMaxSession(java.sql.Connection con, long sessionId, java.lang.String userId, java.lang.String serverHost, java.lang.String serverName, int tenantId) throws MXException
con
- sessionId
- This parameter is not used.userId
- serverHost
- serverName
- MXException
public static void deleteAllRowsForServer(java.sql.Connection con, java.lang.String serverName, java.lang.String serverHost) throws MXException
con
- serverName
- serverHost
- MXException
addLoginTrackingForRestart(java.sql.Connection, java.lang.String, java.lang.String)
public static void unlockRecords(java.sql.Connection con, java.lang.String serverName, java.lang.String serverHost) throws java.lang.Exception
java.lang.Exception
public static void removeDeadTenantSession(java.sql.Connection con) throws java.lang.Exception
con
- java.lang.Exception
public static void updateReloadCache(java.sql.Connection con, java.lang.String serverName, java.lang.String serverHost, java.lang.String reload, boolean updateAllServers) throws MXException
con
- serverName
- serverHost
- reload
- the cache name that has just been reloaded on this serverupdateAllServers
- True to update all other instances of MXServer, false
to update only this instance. When true, maxsession.reloadcache is updated
for the other instances with the names of cache to be reloaded.MXException
public static java.util.List<java.lang.Integer> getAllTeanants(java.sql.Connection con) throws MXException
con
- MXException
public static java.util.Vector getAllServerNamesWithTimestamp(java.sql.Connection con) throws MXException
con
- MXException
public static java.util.Vector getAllServerNames(java.sql.Connection con) throws MXException
con
- MXException
public static java.util.Vector getAllServersInfo(java.sql.Connection con) throws MXException
con
- MXException
public static java.lang.String getServerInfo(java.sql.Connection con, java.lang.String serverHost, java.lang.String serverName) throws MXException
con
- MXException
public static java.util.Map<java.lang.Integer,java.lang.String> getAllTenantsServerInfo(java.sql.Connection con, java.lang.String serverHost, java.lang.String serverName) throws MXException
con
- MXException
public static java.util.List<java.lang.Integer> getTenantList(java.sql.Connection con, java.lang.String serverName, java.lang.String serverHost) throws MXException
con
- MXException
public static java.lang.String getNewReloadCacheForOwnerServer(java.lang.String dbReloadCache, java.lang.String cacheName)
dbReloadCache
- cacheName
- public static int updateExecute(java.sql.Connection con, java.lang.String serverHost, java.lang.String serverName, java.lang.String newCacheValue, java.lang.String oldValue, boolean updateHeartbeat) throws java.lang.Exception
con
- serverHost
- serverName
- newCacheValue
- updateHeartbeat
- True to update maxsession.servertimestamp, else False.
This should be true only if we're updating our own server.java.lang.Exception
public static void updateMaxSessionTimestamp(java.sql.Connection con, java.lang.String serverHost, java.lang.String serverName) throws java.lang.Exception
con
- serverHost
- serverName
- java.lang.Exception