Package net.sf.joafip.kvstore.service

Examples of net.sf.joafip.kvstore.service.FileForStorable


    final int fileOperationRetryMsDelay = setup
        .getFileOperationRetryMsDelay();
    // true if crash safe mode enabled
    final boolean crashSafeMode;
    // to access data on file, used by heap element manager
    final FileForStorable fileForStorable;
    // backup data file, used by heap element manager
    final FileForStorable fileForStorableBackup;
    // flag file state stable for data file
    final File stateOkFlagFile;
    // flag file state stable for backup data file
    final File stateBackupOkFlagFile;
    // flag file indicating backup and data file stable state
    final File globalStateFlagFile;
    if (setup.isCrashSafeMode()) {
      crashSafeMode = true;
      fileForStorable = new FileForStorable(
          setup.getDataFileAccessParameter());
      /* no read cache on backup copy, not used for read */
      fileForStorableBackup = new FileForStorable(
          setup.getBackupFileAccessParameter());
      stateOkFlagFile = setup.getStateOkFlagFile();
      stateBackupOkFlagFile = setup.getStateBackupOkFlagFile();
      globalStateFlagFile = setup.getGlobalStateFlagFile();
    } else {
      crashSafeMode = false;
      fileForStorable = new FileForStorable(
          setup.getDataFileAccessParameter());
      fileForStorableBackup = null;// NOPMD no file defined
      stateOkFlagFile = null;// NOPMD no file defined
      stateBackupOkFlagFile = null;// NOPMD no file defined
      globalStateFlagFile = null;// NOPMD no file defined
View Full Code Here


        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(new File(fileName));
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);
    /* length = DATA1.length() + 4 */
    storableIn1 = new Storable(fileForStorable, 0);
    /* length= DATA1.length() + 4 */
    storableOut1 = new Storable(fileForStorable, 0);
    storableOut1.setValueIsChangedValueToSave();
View Full Code Here

        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(dataFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);

    final FileForStorable backupFileForStorage;
    fileAccessParameter = new FileAccessParameter();
    fileAccessParameter
        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(backupFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    backupFileForStorage = new FileForStorable(fileAccessParameter);

    heapElementManager = new HeapElementManager(fileForStorable,
        stateDataFile, backupFileForStorage, stateDataBackupFile,
        globalStateFile, false, false, 1, 0, openFileTraceFile);
    heapElementManager.setHeapRecordFactory(this);
View Full Code Here

        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(dataFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);

    fileAccessParameter = new FileAccessParameter();
    fileAccessParameter
        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(backupFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    backupFileForStorable = new FileForStorable(fileAccessParameter);

    final File globalStateFile;
    globalStateFile = new File(runtimePath + File.separator + "global.flag");
    final File openFileTraceFile = new File(runtimePath + File.separator
        + "trace.txt");
View Full Code Here

        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(file);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);
    fileForStorable.open();
  }
View Full Code Here

    fileAccessParameter.setFile(new File(TestConstant
        .getWinRamDiskRuntimeDir() + File.separator + "test.dat"));
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);
  }
View Full Code Here

        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(dataFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    fileForStorable = new FileForStorable(fileAccessParameter);

    fileAccessParameter = new FileAccessParameter();
    fileAccessParameter
        .setFileAccessMode(EnumFileAccessMode.NIO_RANDOM_FILE_ACCESS);
    fileAccessParameter.setFile(backupFile);
    fileAccessParameter.setMaxRetry(1);
    fileAccessParameter.setRetryMsDelay(0);
    fileAccessParameter.setUseCache(false);
    backupFileForStorable = new FileForStorable(fileAccessParameter);

    heapElementManager = new HeapElementManager(fileForStorable,
        stateDataFile, backupFileForStorable, stateDataBackupFile,
        globalStateFlag, false, false, 1, 0, openFileTraceFile);
    heapElementManager.setHeapRecordFactory(this);
View Full Code Here

TOP

Related Classes of net.sf.joafip.kvstore.service.FileForStorable

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.