private void cancelCommand(final WsScheduledCommand command) { command.cancel((ScheduledFuture<?>) removeAttribute(command.getScheduledFutureKey())); }
private void scheduleCommand(WsScheduledCommand command, final long delay) { setAttribute(command.getScheduledFutureKey(), command.schedule(scheduler, delay, TimeUnit.SECONDS)); }