Package org.hibernate.search.jmx

Examples of org.hibernate.search.jmx.StatisticsInfo


      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }

    this.indexReaderAccessor = new DefaultIndexReaderAccessor( this );
  }
View Full Code Here


    // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
    if ( JMXRegistrar.isNameRegistered( objectName ) ) {
      JMXRegistrar.unRegisterMBean( objectName );
    }
    StatisticsInfo statisticsInfo = new StatisticsInfo( statistics );
    JMXRegistrar.registerMBean( statisticsInfo, objectName );
    return objectName;
  }
View Full Code Here

      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }

    this.indexReaderAccessor = new DefaultIndexReaderAccessor( this );
  }
View Full Code Here

      Statistics stats = sf.getStatistics();
      stats.setStatisticsEnabled(cfg.jmxStatistics().enabled());
      try {
         ObjectName statsObjName = new ObjectName(
               jmxDomain + ":" + queryGroupName + ",component=Statistics");
         JmxUtil.registerMBean(new StatisticsInfo(stats), statsObjName, mbeanServer);
      } catch (Exception e) {
         throw new CacheException(
               "Unable to register query module statistics mbean", e);
      }
View Full Code Here

    // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
    if ( JMXRegistrar.isNameRegistered( objectName ) ) {
      JMXRegistrar.unRegisterMBean( objectName );
    }
    StatisticsInfo statisticsInfo = new StatisticsInfo( statistics );
    JMXRegistrar.registerMBean( statisticsInfo, objectName );
    return objectName;
  }
View Full Code Here

      Statistics stats = sf.getStatistics();
      stats.setStatisticsEnabled(cfg.jmxStatistics().enabled());
      try {
         ObjectName statsObjName = new ObjectName(
               jmxDomain + ":" + queryGroupName + ",component=Statistics");
         JmxUtil.registerMBean(new StatisticsInfo(stats), statsObjName, mbeanServer);
      } catch (Exception e) {
         throw new CacheException(
               "Unable to register query module statistics mbean", e);
      }
View Full Code Here

      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }
  }
View Full Code Here

      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }
  }
View Full Code Here

      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }

    this.indexReaderAccessor = new DefaultIndexReaderAccessor( this );
  }
View Full Code Here

      // since the SearchFactory is mutable we might have an already existing MBean which we have to unregister first
      if ( JMXRegistrar.isNameRegistered( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME ) ) {
        JMXRegistrar.unRegisterMBean( StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME );
      }
      JMXRegistrar.registerMBean(
          new StatisticsInfo( statistics ), StatisticsInfoMBean.STATISTICS_MBEAN_OBJECT_NAME
      );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.jmx.StatisticsInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.