/** * Sets the maximum number elements on Disk. 0 means unlimited. * <p> * This property can be modified dynamically while the cache is operating. * * @param maxElementsOnDisk the maximum number of Elements to allow on the disk. 0 means unlimited. * @deprecated use {@link #setMaxEntriesLocalDisk(long)} for unclustered caches and {@link #setMaxEntriesInCache(long)} for clustered caches. */ public void setMaxElementsOnDisk(int maxElementsOnDisk) { if (onDiskPoolUsage != null && onDiskPoolUsage != PoolUsage.None) { throw new InvalidConfigurationException("MaxEntriesLocalDisk is not compatible with " + "MaxBytesLocalDisk set on cache"); } verifyGreaterThanOrEqualToZero((long) maxElementsOnDisk, "maxElementsOnDisk"); checkDynamicChange(); int oldCapacity = this.maxElementsOnDisk; this.maxElementsOnDisk = maxElementsOnDisk; fireDiskCapacityChanged(oldCapacity, this.maxElementsOnDisk); }
/** * Sets the maximum number elements on Disk. 0 means unlimited. * <p/> * This property can be modified dynamically while the cache is operating. * * @param maxElementsOnDisk the maximum number of Elements to allow on the disk. 0 means unlimited. */ public void setMaxElementsOnDisk(int maxElementsOnDisk) { if (onDiskPoolUsage != null && onDiskPoolUsage != PoolUsage.None) { throw new InvalidConfigurationException("MaxEntriesLocalDisk is not compatible with " + "MaxBytesLocalDisk set on cache"); } checkDynamicChange(); int oldCapacity = this.maxElementsOnDisk; this.maxElementsOnDisk = maxElementsOnDisk; fireDiskCapacityChanged(oldCapacity, this.maxElementsOnDisk); }
/** * Sets the maximum number elements on Disk. 0 means unlimited. * <p> * This property can be modified dynamically while the cache is operating. * * @param maxElementsOnDisk the maximum number of Elements to allow on the disk. 0 means unlimited. * @deprecated use {@link #setMaxEntriesLocalDisk(long)} for unclustered caches and {@link #setMaxEntriesInCache(long)} for clustered caches. */ public void setMaxElementsOnDisk(int maxElementsOnDisk) { if (onDiskPoolUsage != null && onDiskPoolUsage != PoolUsage.None) { throw new InvalidConfigurationException("MaxEntriesLocalDisk is not compatible with " + "MaxBytesLocalDisk set on cache"); } verifyGreaterThanOrEqualToZero((long) maxElementsOnDisk, "maxElementsOnDisk"); checkDynamicChange(); int oldCapacity = this.maxElementsOnDisk; this.maxElementsOnDisk = maxElementsOnDisk; fireDiskCapacityChanged(oldCapacity, this.maxElementsOnDisk); }
/** * Sets the maximum number elements on Disk. 0 means unlimited. * <p/> * This property can be modified dynamically while the cache is operating. * * @param maxElementsOnDisk the maximum number of Elements to allow on the disk. 0 means unlimited. * @deprecated use {@link #setMaxEntriesLocalDisk(long)} for unclustered caches and {@link #setMaxEntriesInCache(long)} for clustered caches. */ public void setMaxElementsOnDisk(int maxElementsOnDisk) { if (onDiskPoolUsage != null && onDiskPoolUsage != PoolUsage.None) { throw new InvalidConfigurationException("MaxEntriesLocalDisk is not compatible with " + "MaxBytesLocalDisk set on cache"); } verifyGreaterThanOrEqualToZero((long) maxElementsOnDisk, "maxElementsOnDisk"); checkDynamicChange(); int oldCapacity = this.maxElementsOnDisk; this.maxElementsOnDisk = maxElementsOnDisk; fireDiskCapacityChanged(oldCapacity, this.maxElementsOnDisk); }