json.put("Persistence Configuration Synchronous writes", false); json.put("Disk Spool Buffer Size in MB", config.getDiskSpoolBufferSizeMB()); json.put("Disk Access Stripes", config.getDiskAccessStripes()); json.put("Disk Expiry Thread Interval Seconds", config.getDiskExpiryThreadIntervalSeconds());
/** * Accessor */ public int getDiskSpoolBufferSizeMB() { return cacheConfiguration.getDiskSpoolBufferSizeMB(); }
/** * Accessor */ public int getDiskSpoolBufferSizeMB() { return cacheConfiguration.getDiskSpoolBufferSizeMB(); }
/** * Accessor */ public int getDiskSpoolBufferSizeMB() { return cacheConfiguration.getDiskSpoolBufferSizeMB(); }
/** * Accessor */ public int getDiskSpoolBufferSizeMB() { return cacheConfiguration.getDiskSpoolBufferSizeMB(); }
this.diskQueue = diskWriter.getQueue(); this.eventService = cache.getCacheEventNotificationService(); this.queueCapacity = cache.getCacheConfiguration().getDiskSpoolBufferSizeMB() * MEGABYTE; this.diskCapacity = cache.getCacheConfiguration().getMaxElementsOnDisk();
@Override public Object getConfigValue(Ehcache cache) { return cache.getCacheConfiguration().getDiskSpoolBufferSizeMB(); } };
element.addAttribute(new SimpleNodeAttribute("diskAccessStripes", cacheConfiguration.getDiskAccessStripes()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_DISK_ACCESS_STRIPES)); element.addAttribute(new SimpleNodeAttribute("diskSpoolBufferSizeMB", cacheConfiguration.getDiskSpoolBufferSizeMB()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_SPOOL_BUFFER_SIZE)); element
xml.attribute("disk-spool-buffer-size-mb", config.getDiskSpoolBufferSizeMB()); xml.attribute("expiry-thread-interval-seconds", Long.toString(config.getDiskExpiryThreadIntervalSeconds())); xml.attribute("max-bytes-local-disk", Long.toString(config.getMaxBytesLocalDisk()));
this.diskQueue = diskWriter.getQueue(); this.eventService = cache.getCacheEventNotificationService(); this.queueCapacity = cache.getCacheConfiguration().getDiskSpoolBufferSizeMB() * MEGABYTE; this.diskCapacity = cache.getCacheConfiguration().getMaxElementsOnDisk();
this.diskQueue = diskWriter.getQueue(); this.eventService = cache.getCacheEventNotificationService(); this.queueCapacity = cache.getCacheConfiguration().getDiskSpoolBufferSizeMB() * MEGABYTE; this.diskCapacity = cache.getCacheConfiguration().getMaxElementsOnDisk();
this.diskQueue = diskWriter.getQueue(); this.eventService = cache.getCacheEventNotificationService(); this.queueCapacity = cache.getCacheConfiguration().getDiskSpoolBufferSizeMB() * MEGABYTE; this.diskCapacity = cache.getCacheConfiguration().getMaxElementsOnDisk();
Configuration toConfiguration() { configureDiskStore(); configureDefaultCache(); for (CacheProvider<?, ?> p : caches.values()) { final String name = p.getName(); final CacheConfiguration c = newCache(name); c.setMemoryStoreEvictionPolicyFromObject(toPolicy(p.evictionPolicy())); c.setMaxElementsInMemory(getInt(name, "memorylimit", p.memoryLimit())); c.setTimeToIdleSeconds(0); c.setTimeToLiveSeconds(getSeconds(name, "maxage", p.maxAge())); c.setEternal(c.getTimeToLiveSeconds() == 0); if (p.disk() && mgr.getDiskStoreConfiguration() != null) { c.setMaxElementsOnDisk(getInt(name, "disklimit", p.diskLimit())); int v = c.getDiskSpoolBufferSizeMB() * MB; v = getInt(name, "diskbuffer", v) / MB; c.setDiskSpoolBufferSizeMB(Math.max(1, v)); c.setOverflowToDisk(c.getMaxElementsOnDisk() > 0); c.setDiskPersistent(c.getMaxElementsOnDisk() > 0); } mgr.addCache(c); } return mgr; }
Configuration toConfiguration() { configureDiskStore(); configureDefaultCache(); for (CacheProvider<?, ?> p : caches.values()) { final String name = p.getName(); final CacheConfiguration c = newCache(name); c.setMemoryStoreEvictionPolicyFromObject(toPolicy(p.evictionPolicy())); c.setMaxElementsInMemory(getInt(name, "memorylimit", p.memoryLimit())); c.setTimeToIdleSeconds(0); c.setTimeToLiveSeconds(getSeconds(name, "maxage", p.maxAge())); c.setEternal(c.getTimeToLiveSeconds() == 0); if (p.disk() && mgr.getDiskStoreConfiguration() != null) { c.setMaxElementsOnDisk(getInt(name, "disklimit", p.diskLimit())); int v = c.getDiskSpoolBufferSizeMB() * MB; v = getInt(name, "diskbuffer", v) / MB; c.setDiskSpoolBufferSizeMB(Math.max(1, v)); c.setOverflowToDisk(c.getMaxElementsOnDisk() > 0); c.setDiskPersistent(c.getMaxElementsOnDisk() > 0); } mgr.addCache(c); } return mgr; }
element.addAttribute(new SimpleNodeAttribute("diskAccessStripes", cacheConfiguration.getDiskAccessStripes()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_DISK_ACCESS_STRIPES)); element.addAttribute(new SimpleNodeAttribute("diskSpoolBufferSizeMB", cacheConfiguration.getDiskSpoolBufferSizeMB()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_SPOOL_BUFFER_SIZE)); element
element.addAttribute(new SimpleNodeAttribute("diskAccessStripes", cacheConfiguration.getDiskAccessStripes()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_DISK_ACCESS_STRIPES)); element.addAttribute(new SimpleNodeAttribute("diskSpoolBufferSizeMB", cacheConfiguration.getDiskSpoolBufferSizeMB()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_SPOOL_BUFFER_SIZE)); element
element.addAttribute(new SimpleNodeAttribute("diskAccessStripes", cacheConfiguration.getDiskAccessStripes()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_DISK_ACCESS_STRIPES)); element.addAttribute(new SimpleNodeAttribute("diskSpoolBufferSizeMB", cacheConfiguration.getDiskSpoolBufferSizeMB()).optional(true) .defaultValue(CacheConfiguration.DEFAULT_SPOOL_BUFFER_SIZE)); element