static { try { // register memory manager mbean MBeanServer mbeanServer = java.lang.management.ManagementFactory.getPlatformMBeanServer(); ObjectName mbeanName = new ObjectName(JMXUtil.JMX_DOMAIN, "name", "SortCollectorImpl-MemoryManager-Int"); StandardMBean mbean = new StandardMBean(intarraymgr.getAdminMBean(), MemoryManagerAdminMBean.class); mbeanServer.registerMBean(mbean, mbeanName); mbeanName = new ObjectName(JMXUtil.JMX_DOMAIN, "name", "SortCollectorImpl-MemoryManager-Float"); mbean = new StandardMBean(floatarraymgr.getAdminMBean(), MemoryManagerAdminMBean.class); mbeanServer.registerMBean(mbean, mbeanName); } catch (Exception e) { logger.error(e.getMessage(), e); } }
public void close() { if (!_closed) { _closed = true; if (contextList != null) { for (CollectorContext context : contextList) { context.clearRuntimeFacetData(); } } if (docidarraylist != null) { while (!docidarraylist.isEmpty()) { intarraymgr.release(docidarraylist.poll()); } } if (scorearraylist != null) { while (!scorearraylist.isEmpty()) { floatarraymgr.release(scorearraylist.poll()); } } } }