/** * */ public boolean isStopped() { return !checkState(false, false); }
/** * Enter a cache call without lock. * * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped. */ public boolean enterIfNotStoppedNoLock() { onEnter(null); return checkState(false, false); }
/** * @param opCtx Operation context to guard. * @return Previous operation context set on this thread. */ @Nullable public CacheOperationContext enterNoLock(@Nullable CacheOperationContext opCtx) { onEnter(opCtx); checkState(false, false); return setOperationContextPerCall(opCtx); }
/** * Enter a cache call. * * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped. */ public boolean enterIfNotStopped() { onEnter(null); // Must unlock in case of unexpected errors to avoid deadlocks during kernal stop. rwLock.readLock().lock(); return checkState(true, false); }
/** * Enter a cache call. */ public void enter() { if (ctx.deploymentEnabled()) ctx.deploy().onEnter(); rwLock.readLock().lock(); checkState(true, true); }
/** * @param opCtx Cache operation context to guard. * @return Previous operation context set on this thread. */ @Nullable public CacheOperationContext enter(@Nullable CacheOperationContext opCtx) { try { GridCacheAdapter<K, V> cache = ctx.cache(); GridCachePreloader preldr = cache != null ? cache.preloader() : null; if (preldr == null) throw new IllegalStateException(new CacheStoppedException(ctx.name())); preldr.startFuture().get(); } catch (IgniteCheckedException e) { throw new IgniteException("Failed to wait for cache preloader start [cacheName=" + ctx.name() + "]", e); } onEnter(opCtx); Lock lock = rwLock.readLock(); lock.lock(); checkState(true, true); // Must unlock in case of unexpected errors to avoid // deadlocks during kernal stop. try { return setOperationContextPerCall(opCtx); } catch (Throwable e) { lock.unlock(); throw e; } }
/** * */ public boolean isStopped() { return !checkState(false, false); }
/** * Enter a cache call without lock. * * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped. */ public boolean enterIfNotStoppedNoLock() { onEnter(null); return checkState(false, false); }
/** * @param opCtx Operation context to guard. * @return Previous operation context set on this thread. */ @Nullable public CacheOperationContext enterNoLock(@Nullable CacheOperationContext opCtx) { onEnter(opCtx); checkState(false, false); return setOperationContextPerCall(opCtx); }
/** * Enter a cache call. * * @return {@code True} if enter successful, {@code false} if the cache or the node was stopped. */ public boolean enterIfNotStopped() { onEnter(null); // Must unlock in case of unexpected errors to avoid deadlocks during kernal stop. rwLock.readLock().lock(); return checkState(true, false); }
/** * Enter a cache call. */ public void enter() { if (ctx.deploymentEnabled()) ctx.deploy().onEnter(); rwLock.readLock().lock(); checkState(true, true); }
/** * @param opCtx Cache operation context to guard. * @return Previous operation context set on this thread. */ @Nullable public CacheOperationContext enter(@Nullable CacheOperationContext opCtx) { try { GridCacheAdapter<K, V> cache = ctx.cache(); GridCachePreloader preldr = cache != null ? cache.preloader() : null; if (preldr == null) throw new IllegalStateException(new CacheStoppedException(ctx.name())); preldr.startFuture().get(); } catch (IgniteCheckedException e) { throw new IgniteException("Failed to wait for cache preloader start [cacheName=" + ctx.name() + "]", e); } onEnter(opCtx); Lock lock = rwLock.readLock(); lock.lock(); checkState(true, true); // Must unlock in case of unexpected errors to avoid // deadlocks during kernal stop. try { return setOperationContextPerCall(opCtx); } catch (Throwable e) { lock.unlock(); throw e; } }