Package scriptella.execution
Class JmxEtlManager
java.lang.Object
scriptella.execution.JmxEtlManager
- All Implemented Interfaces:
JmxEtlManagerMBean
Implementation of
JmxEtlManagerMBean.- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels the managed ETL task.static intCancels all in-progress ETL tasks.static Set<ObjectName>Find ETL mbeans.longReturns the number of executed statements by all connections of the ETL task.getName()Returns name of the MBean assigned at registration time.Returns the date/time when ETL was started.doubleReturns the throughput of the managed ETL task.voidregister()Registers this manager as a JMX mbean.static voidsetMBeanServer(MBeanServer mbeanServer) Sets mbean server to use when registering mbeans.voidUnregisters this manager from the JMX server.
-
Constructor Details
-
JmxEtlManager
-
-
Method Details
-
getExecutedStatementsCount
public long getExecutedStatementsCount()Description copied from interface:JmxEtlManagerMBeanReturns the number of executed statements by all connections of the ETL task.- Specified by:
getExecutedStatementsCountin interfaceJmxEtlManagerMBean- Returns:
- non-negative number of executed statements.
-
getStartDate
Description copied from interface:JmxEtlManagerMBeanReturns the date/time when ETL was started.- Specified by:
getStartDatein interfaceJmxEtlManagerMBean- Returns:
- date/time.
-
getThroughput
public double getThroughput()Description copied from interface:JmxEtlManagerMBeanReturns the throughput of the managed ETL task.- Specified by:
getThroughputin interfaceJmxEtlManagerMBean- Returns:
- statements/sec throughput or 0 if undefined.
-
setMBeanServer
Sets mbean server to use when registering mbeans.By default
ManagementFactory.getPlatformMBeanServer()is used.- Parameters:
mbeanServer- mbean server.
-
register
public void register()Registers this manager as a JMX mbean. -
cancelAll
public static int cancelAll()Cancels all in-progress ETL tasks.- Returns:
- number of cancelled ETL tasks.
-
findEtlMBeans
Find ETL mbeans.- Returns:
- set of object names.
-
unregister
public void unregister()Unregisters this manager from the JMX server.This method does not throws any exceptions.
-
cancel
public void cancel()Description copied from interface:JmxEtlManagerMBeanCancels the managed ETL task.- Specified by:
cancelin interfaceJmxEtlManagerMBean
-
getName
Returns name of the MBean assigned at registration time.- Returns:
- name of the mbean.
-