@Test public void testCacheMustBeInactiveByDefault() { Assert.assertFalse(wanAwareCache.isReady()); }
public boolean isReady() { Boolean active = (Boolean) configMap.get(CACHE_ACTIVE_KEY); if (isMasterCache()) { return active != null && active; } return active != null && active && (isOrchestratorAlive() || !bidirectional); }
WanAwareToolkitCache implements BufferingToolkitCache<K, V>, Watchable { public boolean isReady() { Boolean active = (Boolean) configMap.get(CACHE_ACTIVE_KEY); if (isMasterCache()) { return active != null && active; } return active != null && active && (isOrchestratorAlive() || !bidirectional); } }
WanAwareToolkitCache implements BufferingToolkitCache<K, V>, Watchable { public boolean isReady() { Boolean active = (Boolean) configMap.get(CACHE_ACTIVE_KEY); if (isMasterCache()) { return active != null && active; } return active != null && active && (isOrchestratorAlive() || !bidirectional); } WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                              final ToolkitMap<String, Serializable> configMap,
                              final NonStopFeature nonStop,
                              final ToolkitLock activeLock,
                              final CacheConfiguration cacheConfiguration,
                              final boolean masterCache,
                              final boolean bidirectional);   WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                       final ConcurrentMap<String, Serializable> configMap,
                       final NonStopFeature nonStop,
                       final ToolkitLock configMapLock,
                       final ToolkitLock activeLock,
                       final CacheConfiguration cacheConfiguration,
                       final boolean masterCache,
                       final boolean bidirectional); }
WanAwareToolkitCache implements BufferingToolkitCache<K, V>, Watchable { public boolean isReady() { Boolean active = (Boolean) configMap.get(CACHE_ACTIVE_KEY); if (isMasterCache()) { return active != null && active; } return active != null && active && (isOrchestratorAlive() || !bidirectional); } WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                              final ToolkitMap<String, Serializable> configMap,
                              final NonStopFeature nonStop,
                              final ToolkitLock activeLock,
                              final CacheConfiguration cacheConfiguration,
                              final boolean masterCache,
                              final boolean bidirectional);   WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                       final ConcurrentMap<String, Serializable> configMap,
                       final NonStopFeature nonStop,
                       final ToolkitLock configMapLock,
                       final ToolkitLock activeLock,
                       final CacheConfiguration cacheConfiguration,
                       final boolean masterCache,
                       final boolean bidirectional); boolean isReady(); boolean activate(); boolean deactivate(); @Override Map<Object, Set<ClusterNode>> getNodesWithKeys(final Set portableKeys); @Override void unlockedPutNoReturn(final K k, final V v, final int createTime, final int customTTI, final int customTTL); @Override void unlockedRemoveNoReturn(final Object k); @Override V unlockedGet(final Object k, final boolean quiet); @Override Map<K, V> unlockedGetAll(final Collection<K> keys, final boolean quiet); @Override void removeAll(final Set<K> keys); @Override V put(final K key, final V value, final int createTimeInSecs, final int customMaxTTISeconds,
               final int customMaxTTLSeconds); @Override V putIfAbsent(final K key, final V value, final long createTimeInSecs, final int maxTTISeconds,
                       final int maxTTLSeconds); @Override void putNoReturn(final K key, final V value, final long createTimeInSecs, final int maxTTISeconds,
                          final int maxTTLSeconds); @Override Map<K, V> getAllQuiet(final Collection<K> keys); @Override V getQuiet(final Object key); @Override Map<K, V> getAll(final Collection<? extends K> keys); @Override void putNoReturn(final K key, final V value); @Override void removeNoReturn(final Object key); @Override V putIfAbsent(final K key, final V value); @Override boolean remove(final Object key, final Object value); @Override boolean replace(final K key, final V oldValue, final V newValue); @Override V replace(final K key, final V value); @Override int size(); @Override int quickSize(); @Override boolean isEmpty(); @Override boolean containsKey(final Object key); @Override boolean containsValue(final Object value); @Override V get(final Object key); @Override V put(final K key, final V value); @Override V remove(final Object key); @Override void putAll(final Map<? extends K, ? extends V> m); @Override void clear(); @Override void quickClear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet(); @Override void destroy(); @Override boolean remove(Object key, Object value, ToolkitValueComparator<V> comparator); @Override boolean replace(K key, V oldValue, V newValue, ToolkitValueComparator<V> comparator); @Override boolean equals(final Object o); @Override int hashCode(); @Override boolean isDestroyed(); @Override void setAttributeExtractor(final ToolkitAttributeExtractor<K, V> attrExtractor); @Override QueryBuilder createQueryBuilder(); @Override boolean isBulkLoadEnabled(); @Override boolean isNodeBulkLoadEnabled(); @Override void setNodeBulkLoadEnabled(final boolean enabledBulkLoad); @Override void waitUntilBulkLoadComplete(); @Override String getName(); @Override void clearLocalCache(); @Override V unsafeLocalGet(final Object key); @Override boolean containsLocalKey(final Object key); @Override int localSize(); @Override Set<K> localKeySet(); @Override long localOnHeapSizeInBytes(); @Override long localOffHeapSizeInBytes(); @Override int localOnHeapSize(); @Override int localOffHeapSize(); @Override boolean containsKeyLocalOnHeap(final Object key); @Override boolean containsKeyLocalOffHeap(final Object key); @Override void disposeLocally(); @Override ToolkitReadWriteLock createLockForKey(final K key); @Override void setConfigField(final String name, final Serializable value); @Override Configuration getConfiguration(); @Override void addListener(final ToolkitCacheListener<K> listener); @Override void putIfAbsentVersioned(final K key, final V value, final long version); @Override void putVersioned(final K key, final V value, final long version); @Override void putVersioned(final K key, final V value, final long version, final int createTimeInSecs,
                           final int customMaxTTISeconds, final int customMaxTTLSeconds); @Override void putIfAbsentVersioned(final K key, final V value, final long version, final int createTimeInSecs,
                                   final int customMaxTTISeconds, final int customMaxTTLSeconds); @Override void unlockedPutNoReturnVersioned(final K k, final V v, final long version, final int createTime,
                                           final int customTTI, final int customTTL); @Override void removeVersioned(final Object key, final long version); @Override void registerVersionUpdateListener(final VersionUpdateListener listener); @Override void unregisterVersionUpdateListener(final VersionUpdateListener listener); @Override Set<K> keySetForSegment(final int segmentIndex); @Override VersionedValue<V> getVersionedValue(final Object key); @Override void removeListener(final ToolkitCacheListener<K> listener); @Override void unlockedRemoveNoReturnVersioned(final Object key, final long version); @Override void startBuffering(); @Override boolean isBuffering(); @Override void stopBuffering(); @Override void flushBuffer(); @Override void clearVersioned(); void setUnlimitedCapacity(); @Override void goLive(); @Override void die(); @Override boolean probeLiveness(); @Override String name(); }
WanAwareToolkitCache implements BufferingToolkitCache<K, V>, Watchable { public boolean isReady() { Boolean active = (Boolean) configMap.get(CACHE_ACTIVE_KEY); if (isMasterCache()) { return active != null && active; } return active != null && active && (isOrchestratorAlive() || !bidirectional); } WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                              final ToolkitMap<String, Serializable> configMap,
                              final NonStopFeature nonStop,
                              final ToolkitLock activeLock,
                              final CacheConfiguration cacheConfiguration,
                              final boolean masterCache,
                              final boolean bidirectional);   WanAwareToolkitCache(final BufferingToolkitCache<K, V> delegate,
                       final ConcurrentMap<String, Serializable> configMap,
                       final NonStopFeature nonStop,
                       final ToolkitLock configMapLock,
                       final ToolkitLock activeLock,
                       final CacheConfiguration cacheConfiguration,
                       final boolean masterCache,
                       final boolean bidirectional); boolean isReady(); boolean activate(); boolean deactivate(); @Override Map<Object, Set<ClusterNode>> getNodesWithKeys(final Set portableKeys); @Override void unlockedPutNoReturn(final K k, final V v, final int createTime, final int customTTI, final int customTTL); @Override void unlockedRemoveNoReturn(final Object k); @Override V unlockedGet(final Object k, final boolean quiet); @Override Map<K, V> unlockedGetAll(final Collection<K> keys, final boolean quiet); @Override void removeAll(final Set<K> keys); @Override V put(final K key, final V value, final int createTimeInSecs, final int customMaxTTISeconds,
               final int customMaxTTLSeconds); @Override V putIfAbsent(final K key, final V value, final long createTimeInSecs, final int maxTTISeconds,
                       final int maxTTLSeconds); @Override void putNoReturn(final K key, final V value, final long createTimeInSecs, final int maxTTISeconds,
                          final int maxTTLSeconds); @Override Map<K, V> getAllQuiet(final Collection<K> keys); @Override V getQuiet(final Object key); @Override Map<K, V> getAll(final Collection<? extends K> keys); @Override void putNoReturn(final K key, final V value); @Override void removeNoReturn(final Object key); @Override V putIfAbsent(final K key, final V value); @Override boolean remove(final Object key, final Object value); @Override boolean replace(final K key, final V oldValue, final V newValue); @Override V replace(final K key, final V value); @Override int size(); @Override int quickSize(); @Override boolean isEmpty(); @Override boolean containsKey(final Object key); @Override boolean containsValue(final Object value); @Override V get(final Object key); @Override V put(final K key, final V value); @Override V remove(final Object key); @Override void putAll(final Map<? extends K, ? extends V> m); @Override void clear(); @Override void quickClear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet(); @Override void destroy(); @Override boolean remove(Object key, Object value, ToolkitValueComparator<V> comparator); @Override boolean replace(K key, V oldValue, V newValue, ToolkitValueComparator<V> comparator); @Override boolean equals(final Object o); @Override int hashCode(); @Override boolean isDestroyed(); @Override void setAttributeExtractor(final ToolkitAttributeExtractor<K, V> attrExtractor); @Override QueryBuilder createQueryBuilder(); @Override boolean isBulkLoadEnabled(); @Override boolean isNodeBulkLoadEnabled(); @Override void setNodeBulkLoadEnabled(final boolean enabledBulkLoad); @Override void waitUntilBulkLoadComplete(); @Override String getName(); @Override void clearLocalCache(); @Override V unsafeLocalGet(final Object key); @Override boolean containsLocalKey(final Object key); @Override int localSize(); @Override Set<K> localKeySet(); @Override long localOnHeapSizeInBytes(); @Override long localOffHeapSizeInBytes(); @Override int localOnHeapSize(); @Override int localOffHeapSize(); @Override boolean containsKeyLocalOnHeap(final Object key); @Override boolean containsKeyLocalOffHeap(final Object key); @Override void disposeLocally(); @Override ToolkitReadWriteLock createLockForKey(final K key); @Override void setConfigField(final String name, final Serializable value); @Override Configuration getConfiguration(); @Override void addListener(final ToolkitCacheListener<K> listener); @Override void putIfAbsentVersioned(final K key, final V value, final long version); @Override void putVersioned(final K key, final V value, final long version); @Override void putVersioned(final K key, final V value, final long version, final int createTimeInSecs,
                           final int customMaxTTISeconds, final int customMaxTTLSeconds); @Override void putIfAbsentVersioned(final K key, final V value, final long version, final int createTimeInSecs,
                                   final int customMaxTTISeconds, final int customMaxTTLSeconds); @Override void unlockedPutNoReturnVersioned(final K k, final V v, final long version, final int createTime,
                                           final int customTTI, final int customTTL); @Override void removeVersioned(final Object key, final long version); @Override void registerVersionUpdateListener(final VersionUpdateListener listener); @Override void unregisterVersionUpdateListener(final VersionUpdateListener listener); @Override Set<K> keySetForSegment(final int segmentIndex); @Override VersionedValue<V> getVersionedValue(final Object key); @Override void removeListener(final ToolkitCacheListener<K> listener); @Override void unlockedRemoveNoReturnVersioned(final Object key, final long version); @Override void startBuffering(); @Override boolean isBuffering(); @Override void stopBuffering(); @Override void flushBuffer(); @Override void clearVersioned(); void setUnlimitedCapacity(); @Override void goLive(); @Override void die(); @Override boolean probeLiveness(); @Override String name();  }