Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.infinispan.loaders.leveldb;
  
  

Author(s):
Ray Tsang
 
 	private static final long serialVersionUID = -6138954929695571573L;
 	
 	public static final String DEFAULT_LOCATION = "leveldb/data";
 	public static final String DEFAULT_EXPIRED_LOCATION = "leveldb/expired";
 	public static final int DEFAULT_EXPIRY_QUEUE_SIZE = 10000;
 	public static final int DEFAULT_CLEAR_THRESHOLD = 10000;
 	
 	protected String location = ;
 	protected Integer blockSize;
 	protected Long cacheSize;

ConfigRef:
desc="Whenever a new entry is stored, an expiry entry is created and added to the a queue that is later consumed by the eviction thread. This parameter sets the size of this queue."
 

ConfigRef:
desc="There are two methods to clear all entries in LevelDB. One method is to iterate through all entries and remove each entry individually. The other method is to delete the database and re-init. For smaller databases, deleting individual entries is faster than the latter method. This configuration sets the max number of entries allowed before using the latter method."
 
 	
 	}
 
 	public String getLocation() {
 		return ;
 	}
 
 	public void setLocation(String location) {
 		testImmutability("location");
 		setProperty(location"location");
 		this. = location;
 	}
 
 	public int getExpiryQueueSize() {
 		return ;
 	}
 
 	public void setExpiryQueueSize(int expiryQueueSize) {
 		testImmutability("expiryQueueSize");
 		setProperty(String.valueOf(expiryQueueSize), "expiryQueueSize");
 		this. = expiryQueueSize;
 	}
 
 	public String getExpiredLocation() {
 		return ;
 	}
 
 	public void setExpiredLocation(String expiredLocation) {
 		testImmutability("expiredLocation");
 		setProperty(expiredLocation"expiredLocation");
 		this. = expiredLocation;
 	}
 
 	public int getClearThreshold() {
 		return ;
 	}
 
 	public void setClearThreshold(int clearThreshhold) {
 		testImmutability("clearThreshhold");
 		setProperty(String.valueOf(clearThreshhold), "clearThreshold");
 		this. = clearThreshhold
 	}
 
 	public String getCompressionType() {
 		return ;
 	}
 
 	public void setCompressionType(String compressionType) {
 		testImmutability("compressionType");
 		setProperty(compressionType"compressionType");
 		this. = compressionType;
 	}
 
 	public Integer getBlockSize() {
		return ;
	}
	public void setBlockSize(Integer blockSize) {
		testImmutability("blockSize");
		setProperty(String.valueOf(blockSize), "blockSize");
		this. = blockSize;
	}
	public Long getCacheSize() {
		return ;
	}
	public void setCacheSize(Long cacheSize) {
		setProperty(String.valueOf(cacheSize), "cacheSize");
		this. = cacheSize;
	}
	protected Options getDataDbOptions() {
		Options options = new Options().createIfMissing(true);
		options.compressionType(CompressionType.valueOf());
		if ( != null) {
		}
		if ( != null) {
		}
		return options;
	}
		return new Options()
	}
	protected void setProperty(String properyValueString propertyName,
		if (properyValue != null) {
			try {
				p.setProperty(propertyNameproperyValue);
				// Most likely immutable, so let's work around that
				TypedProperties writableProperties = new TypedProperties(p);
				writableProperties.setProperty(propertyNameproperyValue);
				setProperties(writableProperties);
			}
		}
	}
New to GrepCode? Check out our FAQ X