/** * Registers or updated a persisted reminder. * Reminders are low frequency persisted timers. * They survive the actor's deactivation and even a cluster restart. * * @param reminderName the remainder's name * @return completion promise for this operation */ protected Task<?> registerReminder(String reminderName, long dueTime, long period, TimeUnit timeUnit) { if (!(this instanceof Remindable)) { throw new IllegalArgumentException("This must implement IRemindable: " + this.getClass().getName()); } return runtime.registerReminder((Remindable) reference, reminderName, dueTime, period, timeUnit); }