Package info.aduna.io

Examples of info.aduna.io.NioFile


  {
    super(maxRecords);
    this.recordSize = recordSize;

    File cacheFile = File.createTempFile("txncache", ".dat", cacheDir);
    nioFile = new NioFile(cacheFile);

    // Write file header
    nioFile.writeBytes(MAGIC_NUMBER, 0);
    nioFile.writeByte(FILE_FORMAT_VERSION, MAGIC_NUMBER.length);
  }
View Full Code Here


    }
    if (btree == null) {
      throw new IllegalArgumentException("btree muts not be null");
    }

    this.nioFile = new NioFile(allocNodesFile);
    this.btree = btree;
  }
View Full Code Here

  }

  public IDFile(File file, boolean forceSync)
    throws IOException
  {
    this.nioFile = new NioFile(file);
    this.forceSync = forceSync;

    if (nioFile.size() == 0L) {
      // Empty file, write header
      nioFile.writeBytes(MAGIC_NUMBER, 0);
View Full Code Here

  }

  public DataFile(File file, boolean forceSync)
    throws IOException
  {
    this.nioFile = new NioFile(file);
    this.forceSync = forceSync;

    // Open a read/write channel to the file

    if (nioFile.size() == 0) {
View Full Code Here

    if (comparator == null) {
      throw new IllegalArgumentException("comparator muts not be null");
    }

    File file = new File(dataDir, filenamePrefix + ".dat");
    this.nioFile = new NioFile(file);
    this.comparator = comparator;
    this.forceSync = forceSync;

    File allocFile = new File(dataDir, filenamePrefix + ".alloc");
    allocatedNodesList = new AllocatedNodesList(allocFile, this);
View Full Code Here

  }

  public HashFile(File file, boolean forceSync)
    throws IOException
  {
    this.nioFile = new NioFile(file);
    this.forceSync = forceSync;

    if (nioFile.size() == 0L) {
      // Empty file, insert bucket count, bucket size
      // and item count at the start of the file
View Full Code Here

TOP

Related Classes of info.aduna.io.NioFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.