/** {@inheritDoc} */ @Override public int getQueueLength() { ctx.kernalContext().gateway().readLock(); try { initializeSemaphore(); return sync.getWaiters(); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { ctx.kernalContext().gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public boolean hasQueuedThreads() { ctx.kernalContext().gateway().readLock(); try { initializeSemaphore(); return sync.getWaiters() != 0; } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { ctx.kernalContext().gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public int getQueueLength() { ctx.kernalContext().gateway().readLock(); try { initializeSemaphore(); return sync.getWaiters(); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { ctx.kernalContext().gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public boolean hasQueuedThreads() { ctx.kernalContext().gateway().readLock(); try { initializeSemaphore(); return sync.getWaiters() != 0; } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { ctx.kernalContext().gateway().readUnlock(); } }