Package org.jcoredb.fs.impl

Examples of org.jcoredb.fs.impl.MultiThreadedFileSystem


 
  @Test
  public void appendMultiThreadedTest() throws Exception
  {
   
    IFileSystem fs = new MultiThreadedFileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    Block[] blocks = new Block[NUM_OF_BLOCKS_TO_APPEND];
   
    String testStr = "<test> <content> Hello world! </content> </test>";
    byte[] content = testStr.getBytes();
   
    for (int i = 0; i < NUM_OF_BLOCKS_TO_APPEND; i++) {

      Block b = new Block(new BlockId(0));
      b.setBytes(content);     
      blocks[i] = b;
    }

    long startMs = System.currentTimeMillis();
   
    fs.append(blocks, false);
       
    long endMs = System.currentTimeMillis();
   
    System.out.println(endMs - startMs + "ms");
     
View Full Code Here

TOP

Related Classes of org.jcoredb.fs.impl.MultiThreadedFileSystem

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.