@Override public String toString() { final StringBuilder buffer = new StringBuilder(128); buffer.append(" algorithm=").append(this.getAlgorithm()); if (!this.getAlgorithm().isNone()) { buffer.append("; action=").append(this.getAction()); if (!getAlgorithm().isLRUHeap()) { buffer.append("; maximum=").append(this.getMaximum()); } if (this.getObjectSizer() != null) { buffer.append("; sizer=").append(this.getObjectSizer()); } } return buffer.toString(); }
@Override public String toString() { final StringBuilder buffer = new StringBuilder(128); buffer.append(" algorithm=").append(this.getAlgorithm()); if (!this.getAlgorithm().isNone()) { buffer.append("; action=").append(this.getAction()); if (!getAlgorithm().isLRUHeap()) { buffer.append("; maximum=").append(this.getMaximum()); } if (this.getObjectSizer() != null) { buffer.append("; sizer=").append(this.getObjectSizer()); } } return buffer.toString(); }
/** * Dump the attributes which are common across the PR to the string builder. * @param msg */ public void dumpCommonAttributes(StringBuilder msg) { msg.append("\n\tlru=").append(getEvictionAttributes().getAlgorithm()); if (!getEvictionAttributes().getAlgorithm().isNone()) { msg.append("\n\tlruAction=").append(getEvictionAttributes().getAction()); if (!getEvictionAttributes().getAlgorithm().isLRUHeap()) { msg.append("\n\tlruLimit=").append(getEvictionAttributes().getMaximum()); } } msg.append("\n\tconcurrencyLevel=").append(getConcurrencyLevel()); msg.append("\n\tinitialCapacity=").append(getInitialCapacity()); msg.append("\n\tloadFactor=").append(getLoadFactor()); msg.append("\n\toffHeap=").append(getOffHeap()); msg.append("\n\tstatisticsEnabled=").append(getStatisticsEnabled()); msg.append("\n\tdrId=").append(getId()); msg.append("\n\tisBucket=").append(isBucket()); msg.append("\n\tclearEntryId=").append(getClearOplogEntryId()); msg.append("\n\tflags=").append(getFlags()); }
if (algorithm.isNone()) { return null; // rely on the product to reset
/** * Dump the attributes which are common across the PR to the string builder. * @param msg */ public void dumpCommonAttributes(StringBuilder msg) { msg.append("\n\tlru=").append(getEvictionAttributes().getAlgorithm()); if (!getEvictionAttributes().getAlgorithm().isNone()) { msg.append("\n\tlruAction=").append(getEvictionAttributes().getAction()); if (!getEvictionAttributes().getAlgorithm().isLRUHeap()) { msg.append("\n\tlruLimit=").append(getEvictionAttributes().getMaximum()); } } msg.append("\n\tconcurrencyLevel=").append(getConcurrencyLevel()); msg.append("\n\tinitialCapacity=").append(getInitialCapacity()); msg.append("\n\tloadFactor=").append(getLoadFactor()); msg.append("\n\tstatisticsEnabled=").append(getStatisticsEnabled()); msg.append("\n\tdrId=").append(getId()); msg.append("\n\tisBucket=").append(isBucket()); msg.append("\n\tclearEntryId=").append(getClearOplogEntryId()); msg.append("\n\tflags=").append(getFlags()); }
sb.append("lru=" + getEvictionAttributes().getAlgorithm()); sb.append(lineSeparator); if (!getEvictionAttributes().getAlgorithm().isNone()) { sb.append("lruAction=" + getEvictionAttributes().getAction()); sb.append(lineSeparator);
sb.append("lru=" + getEvictionAttributes().getAlgorithm()); sb.append(lineSeparator); if (!getEvictionAttributes().getAlgorithm().isNone()) { sb.append("lruAction=" + getEvictionAttributes().getAction()); sb.append(lineSeparator);
EvictionAlgorithm algorithm = attributes.getAlgorithm(); out.writeObject(algorithm); if (algorithm.isNone()) {
if (!info.evictionAttr.getAlgorithm().isNone()) { // if the algorithm is set then we want to see action in the result of toString expectedInToString.add("action=" + expectedValue);
throw new IllegalArgumentException("Expected lru to be one of the following: \"none\", \"lru-entry-count\", \"lru-heap-percentage\", or \"lru-memory-size\""); if (ea.isNone()) { lruAction = (byte)EvictionAction.NONE.getValue(); lruLimit = 0;
if (drv.isBucket() && !drv.getActualLruAlgorithm().isNone()) { drv.prlruStats = getDiskStore().getOrCreatePRLRUStats(drv);
|| !pr.getAttributes().getEvictionAttributes().getAlgorithm().isNone()) { return DistributionManager.PARTITIONED_REGION_EXECUTOR;
&& !this.getEvictionAttributes().getAlgorithm().isNone() && this.getEvictionAttributes().getAction().isOverflowToDisk()) || this.getDataPolicy().withPersistence()) {
/** Creates and initializes the singleton instance of ParRegTest in this VM * for HA testing. */ public synchronized static void HydraTask_HA_reinitializeWithClientCache() { if (testInstance == null) { PRObserver.installObserverHook(); testInstance = new ParRegTest(); testInstance.HA_reinitializeClientRegion(); testInstance.initializeInstance(); testInstance.isDataStore = getIsDataStore(); if (testInstance.isBridgeConfiguration) { testInstance.isEmptyClient = testInstance.aRegion.getAttributes().getDataPolicy().isEmpty(); testInstance.isThinClient = !(testInstance.aRegion.getAttributes().getEvictionAttributes().getAlgorithm().isNone()); testInstance.isBridgeClient = true; boolean repeatUntilSuccess = (testInstance.numVMsToStop > testInstance.redundantCopies); // only happens with persistence ParRegUtil.registerInterest(testInstance.aRegion, repeatUntilSuccess); } } setUniqueKeyIndex(); }
if (drv.isBucket() && !drv.getActualLruAlgorithm().isNone()) { drv.prlruStats = getDiskStore().getOrCreatePRLRUStats(drv);
/** Creates and initializes the singleton instance of ParRegTest in this VM * for HA testing. */ public synchronized static void HydraTask_HA_reinitializeAccessor() { if (testInstance == null) { PRObserver.installObserverHook(); testInstance = new ParRegTest(); testInstance.HA_reinitializeRegion(getCachePrmsName()); testInstance.initPdxDiskStore(); testInstance.initializeInstance(); testInstance.isDataStore = getIsDataStore(); if (testInstance.isBridgeConfiguration) { testInstance.isEmptyClient = testInstance.aRegion.getAttributes().getDataPolicy().isEmpty(); testInstance.isThinClient = !(testInstance.aRegion.getAttributes().getEvictionAttributes().getAlgorithm().isNone()); testInstance.isBridgeClient = true; boolean repeatUntilSuccess = (testInstance.numVMsToStop > testInstance.redundantCopies); // only happens with persistence ParRegUtil.registerInterest(testInstance.aRegion, repeatUntilSuccess); } } setUniqueKeyIndex(); }
|| evictionAttributes.getAlgorithm().isNone(); AttributesFactory<K, V> af = new AttributesFactory<K, V>(attrs); String diskStoreName = attrs.getDiskStoreName();
|| evictionAttributes.getAlgorithm().isNone(); AttributesFactory<K, V> af = new AttributesFactory<K, V>(attrs); String diskStoreName = attrs.getDiskStoreName();
if (!getEvictionAttributes().getAlgorithm().isNone()) { msg += " -lruAction=" + getEvictionAttributes().getAction(); if (!getEvictionAttributes().getAlgorithm().isLRUHeap()) {
if (!getEvictionAttributes().getAlgorithm().isNone()) { msg += " -lruAction=" + getEvictionAttributes().getAction(); if (!getEvictionAttributes().getAlgorithm().isLRUHeap()) {