Package org.jcoredb.fs.impl

Examples of org.jcoredb.fs.impl.FileSystem.open()


    fs.create(Integer.MAX_VALUE);
    fs.close();
   
    //Open the File System
    fs = new FileSystem(Constants.ROOT_PATH);
    fs.open();
    fs.drop(Integer.MAX_VALUE);
   
    assertTrue(new File(Constants.ROOT_PATH + org.jcoredb.system.Constants.PATH_SEP + 0).exists());
    assertFalse(new File(Constants.ROOT_PATH + org.jcoredb.system.Constants.PATH_SEP + Integer.MAX_VALUE).exists());
  }
View Full Code Here


  {
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
   
    fs = new FileSystem(Constants.ROOT_PATH);
    fs.open();
   
    FileSystemConfig cfg = Configs.getFSConfig();   
   
    ISegment[] segments = fs.getContainer(0).getSegments();
   
View Full Code Here

  @Test
  public void readTest() throws Exception
  {
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    ArrayList<Block> blocks = new ArrayList<Block>();
    ArrayList<BlockId> blockIds = new ArrayList<BlockId>();
   
    String testStr = "<test> <content> Hello world! </content> </test>";
View Full Code Here

  public void writeTest() throws Exception
  {

    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    ArrayList<Block> blocks = new ArrayList<Block>();
    ArrayList<BlockId> blockIds = new ArrayList<BlockId>();
   
    String testStr = "<test> <content> Hello world! </content> </test>";
View Full Code Here

  @Test
  public void appendSingleThreadedTest() throws Exception
  {
    IFileSystem fs = new FileSystem(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();
View Full Code Here

   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
   
    FileSystem fs = new FileSystem(Configs.getFSConfig().getRootDir());
    fs.open();
    FileSystemRegistry.register(Constants.HOST,fs);
   
    HTTPServer srv = new HTTPServer();
    srv.start();
  }
View Full Code Here

  @Test
  public void startHTTPServerTest() throws Exception {
   
    FileSystem fs = new FileSystem("C:\\data\\jcoredb");
    fs.open();
    FileSystemRegistry.register(Constants.HOST, fs);
 
    HTTPServer.main(new String[0]);
   
    System.out.println("Press any key!");
View Full Code Here

  @Test
  public void appendTest() throws Exception {
 
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    Block b = new Block(new BlockId(0));
    byte[] content = "<test> <content> Hello world! </content> </test>".getBytes();
    b.setBytes(content);
   
View Full Code Here

  @Test
  public void deleteTest() throws Exception
  {
    IFileSystem fs = new FileSystem(Constants.ROOT_PATH);
    fs.create(0);
    fs.open();
   
    ArrayList<Block> blocks = new ArrayList<Block>();
    ArrayList<BlockId> blockIds = new ArrayList<BlockId>();
   
    for (int i = 0; i < 200; i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.