Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.stanfy.enroscar.net.cache;
 
 import java.io.File;
Base cache with limited maximum size.

Author(s):
Roman Mazur (Stanfy - http://stanfy.com)
 
public abstract class BaseSizeRestrictedCache extends ResponseCache {

  
Default maximum size.
  public static final long MAX_SIZE_DEFUALT = 6 * 1024 * 1024;

  
Max size.
  private long maxSize = ;

  
Working directory.
  private File workingDirectory;

  
Set cache working directory.

Parameters:
workingDirectory cache working directory
  protected void setWorkingDirectory(final File workingDirectory) {
    this. = workingDirectory;
  }
  
Set cache size limit.

Parameters:
maxSize cache maximum size
  protected void setMaxSize(final long maxSize) {
    this. = maxSize;
  }
  public File getWorkingDirectory() { return ; }
  public long getMaxSize() { return ; }
New to GrepCode? Check out our FAQ X