Class JmxEtlManager

java.lang.Object
scriptella.execution.JmxEtlManager
All Implemented Interfaces:
JmxEtlManagerMBean

public class JmxEtlManager extends Object implements JmxEtlManagerMBean
Implementation of JmxEtlManagerMBean.
Version:
1.0
Author:
Fyodor Kupolov
  • Constructor Details

    • JmxEtlManager

      public JmxEtlManager(EtlContext ctx)
  • Method Details

    • getExecutedStatementsCount

      public long getExecutedStatementsCount()
      Description copied from interface: JmxEtlManagerMBean
      Returns the number of executed statements by all connections of the ETL task.
      Specified by:
      getExecutedStatementsCount in interface JmxEtlManagerMBean
      Returns:
      non-negative number of executed statements.
    • getStartDate

      public Date getStartDate()
      Description copied from interface: JmxEtlManagerMBean
      Returns the date/time when ETL was started.
      Specified by:
      getStartDate in interface JmxEtlManagerMBean
      Returns:
      date/time.
    • getThroughput

      public double getThroughput()
      Description copied from interface: JmxEtlManagerMBean
      Returns the throughput of the managed ETL task.
      Specified by:
      getThroughput in interface JmxEtlManagerMBean
      Returns:
      statements/sec throughput or 0 if undefined.
    • setMBeanServer

      public static void setMBeanServer(MBeanServer mbeanServer)
      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

      public static Set<ObjectName> 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: JmxEtlManagerMBean
      Cancels the managed ETL task.
      Specified by:
      cancel in interface JmxEtlManagerMBean
    • getName

      public ObjectName getName()
      Returns name of the MBean assigned at registration time.
      Returns:
      name of the mbean.