java.lang.Object
com.aoindustries.aoserv.master.DaemonHandler
The
AOServDaemonHandler
handles all the accesses to the daemons.- Author:
- AO Industries, Inc.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The amount of time before a daemon will be accessed again once flagged as unavailable. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
flagDaemonAsDown
(int linuxServer) static int
static HostAddress
getDaemonConnectAddress
(DatabaseAccess database, int linuxServer) static int
static AoservDaemonConnector
getDaemonConnector
(DatabaseAccess database, int linuxServer) static int
getDaemonConnectorPoolSize
(DatabaseAccess database, int linuxServer) static Port
getDaemonConnectorPort
(DatabaseAccess database, int linuxServer) static String
getDaemonConnectorProtocol
(DatabaseAccess database, int linuxServer) static int
static int
static int
static int
static long
static long
static int
static Server.DaemonAccess
grantDaemonAccess
(DatabaseConnection conn, int linuxServer, HostAddress connectAddress, int daemonCommandCode, String param1, String param2, String param3, String param4) static void
invalidateTable
(Table.TableId tableId) 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.
-
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:
IOException
SQLException
-
getDaemonConnectorPort
public static Port getDaemonConnectorPort(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOException
SQLException
-
getDaemonConnectorProtocol
public static String getDaemonConnectorProtocol(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOException
SQLException
-
getDaemonConnectorPoolSize
public static int getDaemonConnectorPoolSize(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOException
SQLException
-
getDaemonConnector
public static AoservDaemonConnector getDaemonConnector(DatabaseAccess database, int linuxServer) throws IOException, SQLException - Throws:
IOException
SQLException
-
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 ornull
to use the default- Throws:
IOException
SQLException
-