/** * start shutdown of the runtime, this can be vetoed or postponed by any shutdown listeners */ public void requestShutdown() { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { msgCommandChannel.builder.requestShutdown(); } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } } }
/** * start shutdown of the runtime, this can be vetoed or postponed by any shutdown listeners */ public void requestShutdown() { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { msgCommandChannel.builder.requestShutdown(); } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * start shutdown of the runtime, this can be vetoed or postponed by any shutdown listeners */ public void requestShutdown() { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { msgCommandChannel.builder.requestShutdown(); } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * start shutdown of the runtime, this can be vetoed or postponed by any shutdown listeners */ public void requestShutdown() { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { msgCommandChannel.builder.requestShutdown(); } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * start shutdown of the runtime, this can be vetoed or postponed by any shutdown listeners */ public void requestShutdown() { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { msgCommandChannel.builder.requestShutdown(); } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * Causes this channel to delay processing any actions until the specified * amount of time has elapsed. * * @param durationNanos Nanos to delay * * @return True if blocking was successful, and false otherwise. */ @Deprecated public boolean delay(long durationNanos) { assert(enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { if (goHasRoom()) { MsgCommandChannel.publishBlockChannel(durationNanos, this); return true; } else { return false; } } finally { assert(exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * Causes this channel to delay processing any actions * until the specified UNIX time is reached. * * @return True if blocking was successful, and false otherwise. */ @Deprecated public boolean delayUntil(long msTime) { assert(enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { if (goHasRoom()) { MsgCommandChannel.publishBlockChannelUntil(msTime, this); return true; } else { return false; } } finally { assert(exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * * @param durationNanos delay in nanoseconds * @return true if msgCommandChannel.goHasRoom <p> else return false */ public boolean delay(long durationNanos) { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { if (msgCommandChannel.goHasRoom()) { MsgCommandChannel.publishBlockChannel(durationNanos, msgCommandChannel); return true; } else { return false; } } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }
/** * * @param msTime time to delay in miliseconds * @return true if msgCommandChannel.goHasRoom <p> else return false */ public boolean delayUntil(long msTime) { assert(msgCommandChannel.enterBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; try { if (msgCommandChannel.goHasRoom()) { MsgCommandChannel.publishBlockChannelUntil(msTime, msgCommandChannel); return true; } else { return false; } } finally { assert(msgCommandChannel.exitBlockOk()) : "Concurrent usage error, ensure this never called concurrently"; } }