@Override public void initialise() throws InitialisationException { scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory("ObjectStoreManager-Monitor", this.getClass() .getClassLoader())); }
protected void init() { if (monitorFrequency <= 0) { throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("monitorFrequency", new Integer(monitorFrequency)).toString()); } monitors = new ConcurrentHashMap(); if (scheduler == null) { this.scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory(name + ".expiry.monitor", contextClassLoader)); scheduler.scheduleWithFixedDelay(this, 0, monitorFrequency, TimeUnit.MILLISECONDS); } }
public void initialise() throws InitialisationException { if (name == null) { name = UUID.getUUID(); } if (expirationInterval <= 0) { throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval", new Integer(expirationInterval)).toString()); } if (scheduler == null) { this.scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", this.getClass().getClassLoader())); scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS); } }
@Override public void initialise() throws InitialisationException { if (name == null) { name = UUID.getUUID(); } if (expirationInterval <= 0) { throw new IllegalArgumentException(CoreMessages.propertyHasInvalidValue("expirationInterval", new Integer(expirationInterval)).toString()); } if (scheduler == null) { this.scheduler = new ScheduledThreadPoolExecutor(1); scheduler.setThreadFactory(new DaemonThreadFactory(name + "-Monitor", context.getExecutionClassLoader())); scheduler.scheduleWithFixedDelay(this, 0, expirationInterval, TimeUnit.MILLISECONDS); } }