protected AbstractColumnFamilyRecordWriter(Configuration conf) {
   this.conf = conf;
   this.ringCache = new RingCache(conf);
   this.queueSize =
       conf.getInt(
           AbstractColumnFamilyOutputFormat.QUEUE_SIZE, 32 * FBUtilities.getAvailableProcessors());
   batchThreshold = conf.getLong(AbstractColumnFamilyOutputFormat.BATCH_THRESHOLD, 32);
   consistencyLevel = ConsistencyLevel.valueOf(ConfigHelper.getWriteConsistencyLevel(conf));
 }
Example #2
0
  /**
   * @short Create the environment for following tests.
   * @descr create an empty test frame, where we can load different components inside.
   */
  @Before
  public void before() {
    m_aLog =
        new Protocol(
            Protocol.MODE_HTML | Protocol.MODE_STDOUT,
            Protocol.FILTER_NONE,
            utils.getUsersTempDir() + "/complex_log_ascii_01.html");

    try {
      // get uno service manager from global test environment
      m_xSMGR = getMSF();

      // get another helper to e.g. create test documents
      m_aSOF = SOfficeFactory.getFactory(m_xSMGR);

      // create AutoSave instance
      m_xAutoSave = theAutoRecovery.get(connection.getComponentContext());

      // prepare AutoSave
      // make sure it will be started every 1 min
      ConfigHelper aConfig =
          new ConfigHelper(
              connection.getComponentContext(), "org.openoffice.Office.Recovery", false);
      aConfig.writeRelativeKey("AutoSave", "Enabled", Boolean.TRUE);
      aConfig.writeRelativeKey("AutoSave", "TimeIntervall", Integer.valueOf(1)); // 1 min
      aConfig.flush();
      aConfig = null;

      // is needed to parse dispatch commands
      m_xURLParser =
          UnoRuntime.queryInterface(
              XURLTransformer.class, m_xSMGR.createInstance("com.sun.star.util.URLTransformer"));

    } catch (java.lang.Throwable ex) {
      m_aLog.log(ex);
      fail("Couldn't create test environment");
    }
  }