scriptella.execution
Class JmxEtlManager

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

public class JmxEtlManager
extends java.lang.Object
implements JmxEtlManagerMBean

Implementation of JmxEtlManagerMBean.

Version:
1.0
Author:
Fyodor Kupolov

Constructor Summary
JmxEtlManager(EtlContext ctx)
           
 
Method Summary
 void cancel()
          Cancels the managed ETL task.
static int cancelAll()
          Cancels all in-progress ETL tasks.
static java.util.Set<javax.management.ObjectName> findEtlMBeans()
          Find ETL mbeans.
 long getExecutedStatementsCount()
          Returns the number of executed statements by all connections of the ETL task.
 java.util.Date getStartDate()
          Returns the date/time when ETL was started.
 double getThroughput()
          Returns the throughput of the managed ETL task.
 void register()
          Registers this manager as a JMX mbean.
static void setMBeanServer(javax.management.MBeanServer mbeanServer)
          Sets mbean server to use when registering mbeans.
 void unregister()
          Unregisters this manager from the JMX server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxEtlManager

public JmxEtlManager(EtlContext ctx)
Method Detail

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 java.util.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(javax.management.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 java.util.Set<javax.management.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


Copyright © Copyright 2006-2009 The Scriptella Project Team.