Examples of ReadWritableFile


Examples of org.entityfs.ReadWritableFile

    m_databases = new ArrayList<ShadowCopyTransactionalDatabase<String, String, Long>>(noOfDatabases);
    m_dbFiles = new HashMap<Integer, File[]>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      DatabaseBackendFactory<String, String, Long> baf = new HeapBackendFactory<String, String>(StringSerializer.INSTANCE, StringSerializer.INSTANCE, lah);
      ShadowCopyTransactionalDatabase<String, String, Long> db = new ShadowCopyTransactionalDatabase<String, String, Long>(new SingleFileManager(ff, tmpDirD), baf, false, lah);
View Full Code Here

Examples of org.entityfs.ReadWritableFile

    m_databases = new ArrayList<ShadowCopyTransactionalDatabase<Integer, Long, KeyAndValue<Integer, Long>>>(noOfDatabases);
    m_dbFiles = new HashMap<Integer, File[]>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<Integer> nrb = new FileBackedNodeRepositoryBuilder<Integer, Long>().setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE).setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_nodeSize));
      if (m_lruCacheSize > 0)
View Full Code Here

Examples of org.entityfs.ReadWritableFile

  public void testDelete()
  {
    File tmpFile = FileSupport.createTempFile();
    try
    {
      ReadWritableFile f = new ReadWritableFileAdapter(tmpFile);
      LogAdapterHolder lah = new LogAdapterHolder(new StdOutLogAdapter());
      FileBackedNodeRepository<Long, Long> nr = new FileBackedNodeRepository<Long, Long>(f, false, 0, new NumberOfRecordsNodeSizeStrategy(2), false, LongNullSerializer.INSTANCE, LongSerializer.INSTANCE, 8, 8192, null, lah);
      BPlusTree<Long, Long> mgr = new BPlusTree<Long, Long>(nr, lah);
      try
      {
View Full Code Here

Examples of org.entityfs.ReadWritableFile

  public void testCompactWithDeletedLeafNode()
  {
    File tmpFile = FileSupport.createTempFile();
    try
    {
      ReadWritableFile f = new ReadWritableFileAdapter(tmpFile);
      LogAdapterHolder lah = new LogAdapterHolder(new StdOutLogAdapter());
      FileBackedNodeRepository<Long, Integer> nr = new FileBackedNodeRepository<Long, Integer>(f, false, 0, new NumberOfRecordsNodeSizeStrategy(2), false, LongNullSerializer.INSTANCE, IntegerSerializer.INSTANCE, 8, 8192, null, lah);
      BPlusTree<Long, Integer> mgr = new BPlusTree<Long, Integer>(nr, lah);
      try
      {
View Full Code Here

Examples of org.entityfs.ReadWritableFile

  public void testCreateRepositoryOnNonEmptyFileWithDeletedNodes()
  {
    File tmpFile = FileSupport.createTempFile();
    try
    {
      ReadWritableFile f = new ReadWritableFileAdapter(tmpFile);
      LogAdapterHolder lah = new LogAdapterHolder(new StdOutLogAdapter());
      NodeSizeStrategy nss = new NumberOfRecordsNodeSizeStrategy(2);
      FileBackedNodeRepository<Long, Long> nr = new FileBackedNodeRepository<Long, Long>(f, false, 0, nss, false, LongNullSerializer.INSTANCE, LongSerializer.INSTANCE, 8, 8192, null, lah);
      BPlusTree<Long, Long> mgr = new BPlusTree<Long, Long>(nr, lah);
      try
View Full Code Here

Examples of org.entityfs.ReadWritableFile

    m_databases = new ArrayList<ShadowCopyTransactionalDatabase<String, String, Long>>(noOfDatabases);
    m_dbFiles = new HashMap<Integer, File[]>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File indf = FileSupport.createTempFile();
      ReadWritableFile indff = new ReadWritableFileAdapter(indf);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<BigInteger> nrb = new FileBackedNodeRepositoryBuilder<BigInteger, Long>().setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_bTreeNodeSize)).setKeySerializer(new FixedSizeBigIntegerNullSerializer(STRING_HASH_SIZE + 1)).setValueSerializer(LongSerializer.INSTANCE);
      if (m_bTreeLruNodeCacheSize > 0)
View Full Code Here

Examples of org.entityfs.ReadWritableFile

    m_databases = new ArrayList<ShadowCopyTransactionalDatabase<Integer, Long, Long>>(noOfDatabases);
    m_dbFiles = new HashMap<Integer, File[]>(noOfDatabases);
    for (int i = 0; i < noOfDatabases; i++)
    {
      File f = FileSupport.createTempFile();
      ReadWritableFile ff = new ReadWritableFileAdapter(f);
      File indf = FileSupport.createTempFile();
      ReadWritableFile indff = new ReadWritableFileAdapter(indf);
      File tmpDir = FileSupport.createTempDirectory();
      Directory tmpDirD = new FSRWFileSystemBuilder().setRoot(tmpDir).create().getRootDirectory();

      NodeRepositoryBuilder<Integer> nrb = new FileBackedNodeRepositoryBuilder<Integer, Long>().setNodeSizeStrategy(new FixedSizeNodeSizeStrategy(m_bTreeNodeSize)).setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE);
      if (m_bTreeLruNodeCacheSize > 0)
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.