/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will become not equal * to passed one. Once listener will be notified - it will be removed from * this <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is equal to required * and listener was registered, null if current state is not equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsNotEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state != StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }
/** * Register listener, which will be notified, when state will be equal to passed * one. Once listener will be notified - it will be removed from this * <code>StateHolder</code>'s listener set. * @param state State, listener is interested in * @param completionHandler that will be notified. This <code>StateHolder</code> * implementation works with Runnable, Callable, CountDownLatch, Object * listeners * @return <code>ConditionListener</code>, if current state is not equal to required * and listener was registered, null if current state is equal to required. * In both cases listener will be notified */ public Future<E> notifyWhenStateIsEqual(final E state, final CompletionHandler<E> completionHandler) { return notifyWhenConditionMatchState(new Condition() { @Override public boolean check() { return state == StateHolder.this.state; } }, completionHandler); }