public static ClusterInfo determineDsoClusterInstance(ClusterInfo cluster) { ClusterInfo clusterInfo; try { clusterInfo = new TerracottaClusterInfo(); } catch (UnsupportedOperationException e) { clusterInfo = cluster; } catch (NoClassDefFoundError e) { clusterInfo = cluster; } return clusterInfo; } }
public static ClusterInfo determineDsoClusterInstance(ClusterInfo cluster) { ClusterInfo clusterInfo; try { clusterInfo = new TerracottaClusterInfo(); } catch (UnsupportedOperationException e) { clusterInfo = cluster; } catch (NoClassDefFoundError e) { clusterInfo = cluster; } return clusterInfo; } }
public ClusterInfo getClusterInfo() { return new TerracottaClusterInfo(); } }
public ClusterInfo getClusterInfo() { return new TerracottaClusterInfo(); } }
public ClusterInfo getClusterInfo() { return new TerracottaClusterInfo(); } }
public static ClusterInfo determineDsoClusterInstance(ClusterInfo cluster) { ClusterInfo clusterInfo; try { clusterInfo = new TerracottaClusterInfo(); } catch (UnsupportedOperationException e) { clusterInfo = cluster; } catch (NoClassDefFoundError e) { clusterInfo = cluster; } return clusterInfo; } }
public Map<K, Set<ClusterNode>> getNodesWithKeys(final Collection<? extends K> keys) { TerracottaClusterInfo terracottaClusterInfo = new TerracottaClusterInfo(); Map<K, Set<ClusterNode>> map = new HashMap<K, Set<ClusterNode>>(); for (Map m : data.getConstituentMaps()) { Map<K, Set<ClusterNode>> nodesWithKeys = terracottaClusterInfo.getNodesWithKeys(m, keys); for (Entry<K, Set<ClusterNode>> entry : nodesWithKeys.entrySet()) { Set<ClusterNode> clusterNodeSet = map.get(entry.getKey()); if (clusterNodeSet == null) { clusterNodeSet = new HashSet<ClusterNode>(); map.put(entry.getKey(), clusterNodeSet); } clusterNodeSet.addAll(entry.getValue()); } } return map; }
public Map<K, Set<ClusterNode>> getNodesWithKeys(final Collection<? extends K> keys) { TerracottaClusterInfo terracottaClusterInfo = new TerracottaClusterInfo(); Map<K, Set<ClusterNode>> map = new HashMap<K, Set<ClusterNode>>(); for (Map m : data.getConstituentMaps()) { Map<K, Set<ClusterNode>> nodesWithKeys = terracottaClusterInfo.getNodesWithKeys(m, keys); for (Entry<K, Set<ClusterNode>> entry : nodesWithKeys.entrySet()) { Set<ClusterNode> clusterNodeSet = map.get(entry.getKey()); if (clusterNodeSet == null) { clusterNodeSet = new HashSet<ClusterNode>(); map.put(entry.getKey(), clusterNodeSet); } clusterNodeSet.addAll(entry.getValue()); } } return map; }
/** * Perform orphan eviction */ public void endLocalEviction() { log("Local eviction finished"); if (!config.isOrphanEvictionEnabled() || !isOrphanEvictor || !(config.getMaxTTISeconds() > 0 || config.getMaxTTLSeconds() > 0)) { return; } boolean isTimeForOrphanEviction = incrementEvictionCounter(); if (isTimeForOrphanEviction) { log("Running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); // when the cluster information has been injected, there's also no sense to evict ClusterInfo clusterInfo = new TerracottaClusterInfo(); if (clusterInfo.isClusterInitialized()) { store.evictOrphanElements(clusterInfo); } } else { log("Not running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); } }
/** * Perform orphan eviction */ public void endLocalEviction() { log("Local eviction finished"); if (!config.isOrphanEvictionEnabled() || !isOrphanEvictor || !(config.getMaxTTISeconds() > 0 || config.getMaxTTLSeconds() > 0)) { return; } boolean isTimeForOrphanEviction = incrementEvictionCounter(); if (isTimeForOrphanEviction) { log("Running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); // when the cluster information has been injected, there's also no sense to evict ClusterInfo clusterInfo = new TerracottaClusterInfo(); if (clusterInfo.isClusterInitialized()) { store.evictOrphanElements(clusterInfo); } } else { log("Not running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); } }
/** * Perform orphan eviction */ public void endLocalEviction() { log("Local eviction finished"); if (!config.isOrphanEvictionEnabled() || !isOrphanEvictor || !(config.getMaxTTISeconds() > 0 || config.getMaxTTLSeconds() > 0)) { return; } boolean isTimeForOrphanEviction = incrementEvictionCounter(); if (isTimeForOrphanEviction) { log("Running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); // when the cluster information has been injected, there's also no sense to evict ClusterInfo clusterInfo = new TerracottaClusterInfo(); if (clusterInfo.isClusterInitialized()) { store.evictOrphanElements(clusterInfo); } } else { log("Not running orphan eviction (evictionCount = " + evictionCount + ", orphanEvictionPeriod = " + config.getOrphanEvictionPeriod() + ")"); } }