public MutableConfig setTargetMaxTotalCount(int targetMaxTotalCount) { // write <autolock>'d synchronized (this) { this.targetMaxTotalCount = targetMaxTotalCount; notifyAll(); } refresh(); return this; }
public MutableConfig setOrphanEvictionEnabled(boolean orphanEvictionEnabled) { // write <autolock>'d synchronized (this) { this.orphanEvictionEnabled = orphanEvictionEnabled; notifyAll(); } refresh(); return this; }
public MutableConfig setOrphanEvictionPeriod(int orphanEvictionPeriod) { // write <autolock>'d synchronized (this) { this.orphanEvictionPeriod = orphanEvictionPeriod; notifyAll(); } refresh(); return this; }
public MutableConfig setLoggingEnabled(boolean loggingEnabled) { // write <autolock>'d synchronized (this) { this.loggingEnabled = loggingEnabled; notifyAll(); } refresh(); return this; }
public MutableConfig setTargetMaxInMemoryCount(int targetMaxInMemoryCount) { // write <autolock>'d synchronized (this) { this.targetMaxInMemoryCount = targetMaxInMemoryCount; notifyAll(); } refresh(); return this; }
public MutableConfig setMaxTTISeconds(int maxTTISeconds) { if (maxTTISeconds < 0) throw new IllegalArgumentException("Max TTI must be >= 0"); // write <autolock>'d synchronized (this) { this.maxTTISeconds = maxTTISeconds; notifyAll(); } refresh(); return this; }
public CacheConfig setCapacityEvictionPolicyDataFactory(Factory factory) { if (factory == null) throw new NullPointerException("capacityEvictionPolicyDataFactory cannot be null"); // write <autolock>'d synchronized (this) { this.capacityEvictionPolicyDataFactory = factory; notifyAll(); } refresh(); return this; }
public MutableConfig setMaxTTLSeconds(int maxTTLSeconds) { if (maxTTLSeconds < 0) throw new IllegalArgumentException("Max TTL must be >= 0"); // write <autolock>'d synchronized (this) { this.maxTTLSeconds = maxTTLSeconds; notifyAll(); } refresh(); return this; }
public MutableConfig setName(String name) { if (name == null) throw new NullPointerException("Name cannot be null"); // write <autolock>'d synchronized (this) { this.name = name; notifyAll(); } refresh(); return this; }
public void initializeOnLoad() { configListeners = new ArrayList<ConfigChangeListener>(); refresh(); registerTCLoggerIfActive(); }
public MutableConfig() { refresh(); registerTCLoggerIfActive(); }
public MutableConfig(final String name, final boolean loggingEnabled, final int maxTTISeconds, final int maxTTLSeconds, final boolean orphanEvictionEnabled, final int orphanEvictionPeriod, final int targetMaxInMemoryCount, final int targetMaxTotalCount, final CapacityEvictionPolicyData.Factory capacityEvictionPolicyDataFactory) { this.name = name; this.loggingEnabled = loggingEnabled; this.maxTTISeconds = maxTTISeconds; this.maxTTLSeconds = maxTTLSeconds; this.orphanEvictionEnabled = orphanEvictionEnabled; this.orphanEvictionPeriod = orphanEvictionPeriod; this.targetMaxInMemoryCount = targetMaxInMemoryCount; this.targetMaxTotalCount = targetMaxTotalCount; this.capacityEvictionPolicyDataFactory = capacityEvictionPolicyDataFactory; refresh(); registerTCLoggerIfActive(); }