/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ protected void guard() { assert ctx != null; ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { assert ctx != null; ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** * <tt>ctx.gateway().readLock()</tt> */ private void guard() { ctx.gateway().readLock(); }
/** {@inheritDoc} */ @Override public <K, V> Cache<K, V> getCache(String cacheName) { kernalGateway.readLock(); try { return getCache0(cacheName); } finally { kernalGateway.readUnlock(); } }
/** {@inheritDoc} */ @Override public boolean isPrimaryOrBackup(ClusterNode n, K key) { ctx.gateway().readLock(); try { return isPrimary(n, key) || isBackup(n, key); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public String latestVersion() { ctx.gateway().readLock(); try { return ctx.cluster().latestVersion(); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public void signal() { ctx.kernalContext().gateway().readLock(); try { if (!isHeldExclusively()) throw new IllegalMonitorStateException(); validate(false); addOutgoingSignal(name); } finally { ctx.kernalContext().gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public Object affinityKey(K key) { ctx.gateway().readLock(); try { return cache().affinityKey(key); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public boolean isBackup(ClusterNode n, K key) { ctx.gateway().readLock(); try { return cache().assignment().backupPartitions(n.id()).contains(partition(key)); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public boolean isPrimary(ClusterNode n, K key) { ctx.gateway().readLock(); try { return cache().assignment().primaryPartitions(n.id()).contains(partition(key)); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public int partition(K key) { ctx.gateway().readLock(); try { return partition0(cacheName, key, cache()); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public int partitions() { ctx.gateway().readLock(); try { return cache().affinityFunction().partitions(); } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public Future<?> submit(Runnable task) { A.notNull(task, "task != null"); checkShutdown(); ctx.gateway().readLock(); try { return addFuture(ctx.closure().runAsync(BALANCE, task, prj.nodes())); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public <T> Future<T> submit(Callable<T> task) { A.notNull(task, "task != null"); checkShutdown(); ctx.gateway().readLock(); try { return addFuture(ctx.closure().callAsync(BALANCE, task, prj.nodes())); } finally { ctx.gateway().readUnlock(); } }
/** {@inheritDoc} */ @Override public void execute(Runnable cmd) { A.notNull(cmd, "cmd != null"); checkShutdown(); ctx.gateway().readLock(); try { addFuture(ctx.closure().runAsync(BALANCE, cmd, prj.nodes())); } finally { ctx.gateway().readUnlock(); } }