Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2011 the original author or authors. See the notice.md file distributed with this work for additional information regarding copyright ownership. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.iq80.leveldb;
 
 public class Options {
 
     private boolean createIfMissing = true;
     private boolean errorIfExists;
     private int writeBufferSize = 4 << 20;
 
     private int maxOpenFiles = 1000;
 
     private int blockRestartInterval = 16;
     private int blockSize = 4 * 1024;
     private boolean verifyChecksums = true;
     private boolean paranoidChecks = false;
     private DBComparator comparator;
     private Logger logger = null;
     private long cacheSize;
 
     static void checkArgNotNull(Object valueString name) {
         if(value==null) {
             throw new IllegalArgumentException("The "+name+" argument cannot be null");
         }
     }
 
     public boolean createIfMissing()
     {
         return ;
     }
 
     public Options createIfMissing(boolean createIfMissing)
     {
         this. = createIfMissing;
         return this;
     }
 
     public boolean errorIfExists()
     {
         return ;
     }
 
     public Options errorIfExists(boolean errorIfExists)
     {
         this. = errorIfExists;
         return this;
     }
 
     public int writeBufferSize()
     {
         return ;
     }
 
     public Options writeBufferSize(int writeBufferSize)
     {
         this. = writeBufferSize;
         return this;
     }
 
     public int maxOpenFiles()
     {
         return ;
     }
 
     public Options maxOpenFiles(int maxOpenFiles)
     {
         this. = maxOpenFiles;
         return this;
     }
 
     public int blockRestartInterval()
     {
         return ;
     }
 
     public Options blockRestartInterval(int blockRestartInterval)
     {
         this. = blockRestartInterval;
         return this;
     }
 
     public int blockSize()
     {
        return ;
    }
    public Options blockSize(int blockSize)
    {
        this. = blockSize;
        return this;
    }
    {
        return ;
    }
    public Options compressionType(CompressionType compressionType)
    {
        checkArgNotNull(compressionType"compressionType");
        this. = compressionType;
        return this;
    }
    public boolean verifyChecksums()
    {
        return ;
    }
    public Options verifyChecksums(boolean verifyChecksums)
    {
        this. = verifyChecksums;
        return this;
    }
    public long cacheSize() {
        return ;
    }
    public Options cacheSize(long cacheSize) {
        this. = cacheSize;
        return this;
    }
    public DBComparator comparator() {
        return ;
    }
    public Options comparator(DBComparator comparator) {
        this. = comparator;
        return this;
    }
    public Logger logger() {
        return ;
    }
    public Options logger(Logger logger) {
        this. = logger;
        return this;
    }
    public boolean paranoidChecks() {
        return ;
    }
    public Options paranoidChecks(boolean paranoidChecks) {
        this. = paranoidChecks;
        return this;
    }
New to GrepCode? Check out our FAQ X