public PersistedQueue(final File queueEnvPath,final String queueName,final int cacheSize){
  queueEnvPath.mkdirs();
  final EnvironmentConfig dbEnvConfig=new EnvironmentConfig();
  dbEnvConfig.setTransactional(false);
  dbEnvConfig.setAllowCreate(true);
  this.dbEnv=new Environment(queueEnvPath,dbEnvConfig);
  DatabaseConfig dbConfig=new DatabaseConfig();
  dbConfig.setTransactional(false);
  dbConfig.setAllowCreate(true);
  dbConfig.setDeferredWrite(true);
  this.queueDatabase=dbEnv.openDatabase(null,queueName,dbConfig);
  this.queueName=queueName;
  this.cacheSize=cacheSize;
  this.opsCounter=0;
}

public PersistedQueue ( final File queueEnvPath , final String queueName , final int cacheSize ) { queueEnvPath . mkdirs ( ) ; final EnvironmentConfig dbEnvConfig = new EnvironmentConfig ( ) ; dbEnvConfig . setTransactional ( false ) ; dbEnvConfig . setAllowCreate ( true ) ; this . dbEnv = new Environment ( queueEnvPath , dbEnvConfig ) ; DatabaseConfig dbConfig = new DatabaseConfig ( ) ; dbConfig . setTransactional ( false ) ; dbConfig . setAllowCreate ( true ) ; dbConfig . setDeferredWrite ( true ) ; this . queueDatabase = dbEnv . openDatabase ( null , queueName , dbConfig ) ; this . queueName = queueName ; this . cacheSize = cacheSize ; this . opsCounter = 0 ; }
creates instance of persistent queue .
