java.lang.Object
com.aoindustries.aoserv.master.DaemonHandler
The
AOServDaemonHandler handles all the accesses to the daemons.- Author:
- AO Industries, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe amount of time before a daemon will be accessed again once flagged as unavailable. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidflagDaemonAsDown(int linuxServer) static intstatic HostAddressgetDaemonConnectAddress(DatabaseAccess database, int linuxServer) static intstatic AoservDaemonConnectorgetDaemonConnector(DatabaseAccess database, int linuxServer) static intgetDaemonConnectorPoolSize(DatabaseAccess database, int linuxServer) static PortgetDaemonConnectorPort(DatabaseAccess database, int linuxServer) static StringgetDaemonConnectorProtocol(DatabaseAccess database, int linuxServer) static intstatic intstatic intstatic intstatic longstatic longstatic intstatic Server.DaemonAccessgrantDaemonAccess(DatabaseConnection conn, int linuxServer, HostAddress connectAddress, int daemonCommandCode, String param1, String param2, String param3, String param4) static voidinvalidateTable(Table.TableId tableId) static booleanisDaemonAvailable(int linuxServer) The availability of daemons is maintained to avoid repeatedly trying to access a daemon that is not responding while other daemons could be used.
-
Field Details
-
DAEMON_RETRY_DELAY
public static final int DAEMON_RETRY_DELAYThe amount of time before a daemon will be accessed again once flagged as unavailable.- See Also:
-
-
Method Details
-
getDaemonConcurrency
public static int getDaemonConcurrency() -
getDaemonConnections
public static int getDaemonConnections() -
getDaemonConnectAddress
public static HostAddress getDaemonConnectAddress(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDaemonConnectorPort
public static Port getDaemonConnectorPort(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDaemonConnectorProtocol
public static String getDaemonConnectorProtocol(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDaemonConnectorPoolSize
public static int getDaemonConnectorPoolSize(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDaemonConnector
public static AoservDaemonConnector getDaemonConnector(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getDaemonConnects
public static int getDaemonConnects() -
getDaemonCount
public static int getDaemonCount() -
getDaemonMaxConcurrency
public static int getDaemonMaxConcurrency() -
getDaemonPoolSize
public static int getDaemonPoolSize() -
getDaemonTotalTime
public static long getDaemonTotalTime() -
getDaemonTransactions
public static long getDaemonTransactions() -
invalidateTable
-
isDaemonAvailable
public static boolean isDaemonAvailable(int linuxServer) The availability of daemons is maintained to avoid repeatedly trying to access a daemon that is not responding while other daemons could be used. -
flagDaemonAsDown
- Throws:
IOException
-
getDownDaemonCount
public static int getDownDaemonCount() -
grantDaemonAccess
public static Server.DaemonAccess grantDaemonAccess(DatabaseConnection conn, int linuxServer, HostAddress connectAddress, int daemonCommandCode, String param1, String param2, String param3, String param4) throws IOException, SQLException - Parameters:
connectAddress- Overridden connect address ornullto use the default- Throws:
IOExceptionSQLException
-
