public ScheduledExecutorService getScheduledExecutor(Properties properties) {
ScheduledExecutorService executor = (ScheduledExecutorService) properties.get(EXECUTOR);
if (executor == null) {
throw new IllegalStateException(String.format("No %s property was specified within the executor properties: %s", EXECUTOR, properties));
}
return new ManagedScheduledExecutorService(executor);
}