/** * @param other the other ResourceManager with which to compare */ public void sameAs(ResourceManager other) { if (getCriticalHeapPercentage() != other.getCriticalHeapPercentage()) { throw new RuntimeException("Resource Manager critical heap percentages differ: " + getCriticalHeapPercentage() + " != " + other.getCriticalHeapPercentage()); } if (getCriticalOffHeapPercentage() != other.getCriticalOffHeapPercentage()) { throw new RuntimeException("Resource Manager critical off-heap percentages differ: " + getCriticalOffHeapPercentage() + " != " + other.getCriticalOffHeapPercentage()); } if (hasEvictionHeap()) { // If we don't have it set don't compare since other may have been set to // a smart default. if (getEvictionHeapPercentage() != other.getEvictionHeapPercentage()) { throw new RuntimeException("Resource Manager eviction heap percentages differ: " + getEvictionHeapPercentage() + " != " + other.getEvictionHeapPercentage()); } } if (hasEvictionOffHeap()) { // If we don't have it set don't compare since other may have been set to // a smart default. if (getEvictionOffHeapPercentage() != other.getEvictionOffHeapPercentage()) { throw new RuntimeException("Resource Manager eviction off-heap percentages differ: " + getEvictionOffHeapPercentage() + " != " + other.getEvictionOffHeapPercentage()); } } }
/** * @param other the other ResourceManager with which to compare */ public void sameAs(ResourceManager other) { if (getCriticalHeapPercentage() != other.getCriticalHeapPercentage()) { throw new RuntimeException("Resource Manager critical heap percentages differ: " + getCriticalHeapPercentage() + " != " + other.getCriticalHeapPercentage()); } if (getCriticalOffHeapPercentage() != other.getCriticalOffHeapPercentage()) { throw new RuntimeException("Resource Manager critical off-heap percentages differ: " + getCriticalOffHeapPercentage() + " != " + other.getCriticalOffHeapPercentage()); } if (hasEvictionHeap()) { // If we don't have it set don't compare since other may have been set to // a smart default. if (getEvictionHeapPercentage() != other.getEvictionHeapPercentage()) { throw new RuntimeException("Resource Manager eviction heap percentages differ: " + getEvictionHeapPercentage() + " != " + other.getEvictionHeapPercentage()); } } if (hasEvictionOffHeap()) { // If we don't have it set don't compare since other may have been set to // a smart default. if (getEvictionOffHeapPercentage() != other.getEvictionOffHeapPercentage()) { throw new RuntimeException("Resource Manager eviction off-heap percentages differ: " + getEvictionOffHeapPercentage() + " != " + other.getEvictionOffHeapPercentage()); } } }
float ehp = this.creation.getResourceManager().getEvictionHeapPercentage(); if (generateDefaults() || ehp != MemoryThresholds.DEFAULT_EVICTION_PERCENTAGE) { atts.addAttribute("", "", EVICTION_HEAP_PERCENTAGE, "",
float ehp = this.creation.getResourceManager().getEvictionHeapPercentage(); if (generateDefaults() || ehp != MemoryThresholds.DEFAULT_EVICTION_PERCENTAGE) { atts.addAttribute("", "", EVICTION_HEAP_PERCENTAGE, "",