public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException { RegionCreation region = new RegionCreation(this, name, refid); this.addRootRegion(region); return region; }
public CacheLoader setCacheLoader(CacheLoader cacheLoader) { CacheLoader old = this.cacheLoader; this.cacheLoader = cacheLoader; setHasCacheLoader(true); if (cacheLoader instanceof BridgeClient && !hasCacheWriter()) { // fix for bug 36247 setCacheWriter((BridgeClient)cacheLoader); } return old; }
/** * Tests creating a cache with entries defined in the root region */ public void testEntriesInRootRegion() throws CacheException { CacheCreation cache = new CacheCreation(); RegionCreation root = (RegionCreation) cache.createRegion("root", new RegionAttributesCreation(cache)); root.put("KEY1", "VALUE1"); root.put("KEY2", "VALUE2"); root.put("KEY3", "VALUE3"); testXml(cache); }
public void setCompressor(Compressor compressor) { this.compressor = compressor; setHasCompressor(true); // Cloning must be enabled when a compressor is set if (compressor != null) { setCloningEnable(true); } }
public void setDiskDirs(File[] diskDirs) { checkIfDirectoriesExist(diskDirs); this.diskDirs = diskDirs; this.diskDirSizes = new int[diskDirs.length]; for (int i = 0; i < diskDirs.length; i++) { this.diskDirSizes[i] = DiskStoreFactory.DEFAULT_DISK_DIR_SIZE; } setHasDiskDirs(true); }
/** * Examines the given <code>Cache</code> and from it generates XML * data that is written to the given <code>PrintWriter</code>. */ public static void generate(ClientCache cache, PrintWriter pw) { generate(cache, pw, false /* useSchema */); } /**
/** * Sets the attributes of this region */ public void setAttributes(RegionAttributes attrs) { setAttributes(attrs, true); }
@Override public void characters(char[] ch, int start, int length) throws SAXException { handler.characters(ch, start, length); }
/** * Creates a new <code>RegionAttributesCreation</code> with the * default region attributes. */ public RegionAttributesCreation(CacheCreation cc) { this(cc, getDefaultAttributes(cc), true); }
public CustomExpiry setCustomEntryTimeToLive(CustomExpiry custom) { CustomExpiry old = this.customEntryTimeToLive; this.customEntryTimeToLive = custom; setHasCustomEntryTimeToLive(true); return old; }
public void setHDFSStoreName(String hdfsStoreName) { //TODO:HDFS : throw an exception if a disk store is already configured // and vice versa this.hdfsStoreName = hdfsStoreName; setHasHDFSStoreName(true); } public void setHDFSWriteOnly(boolean writeOnly) {
public CacheLoader setCacheLoader(CacheLoader cacheLoader) { CacheLoader old = this.cacheLoader; this.cacheLoader = cacheLoader; setHasCacheLoader(true); return old; }
public ExpirationAttributes setEntryIdleTimeout( ExpirationAttributes idleTimeout) { ExpirationAttributes old = this.entryIdleTimeout; this.entryIdleTimeout = idleTimeout; setHasEntryIdleTimeout(true); return old; }
@Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { handler.startElement(uri, localName, qName, attributes); }
@Override public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { handler.ignorableWhitespace(ch, start, length); }
@Override public Index createHashIndex(String indexName, String indexedExpression, String regionPath) throws IndexInvalidException, IndexNameConflictException, IndexExistsException, RegionNotFoundException, UnsupportedOperationException { return createHashIndex(indexName, indexedExpression, regionPath, ""); }
@Override public Index createIndex(String indexName, String indexedExpression, String regionPath, String imports) throws IndexInvalidException, IndexNameConflictException, IndexExistsException, RegionNotFoundException, UnsupportedOperationException { return createIndex(indexName, IndexType.FUNCTIONAL, indexedExpression, regionPath, imports); }
public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException { RegionCreation region = new RegionCreation(this, name, refid); this.addRootRegion(region); return region; }
@Override public void characters(char[] ch, int start, int length) throws SAXException { handler.characters(ch, start, length); }