Examples of TransactionLog


Examples of co.cask.tephra.persist.TransactionLog

  }

  private void doSnapshot(boolean closing) throws IOException {
    long snapshotTime = 0L;
    TransactionSnapshot snapshot = null;
    TransactionLog oldLog = null;
    try {
      this.logWriteLock.lock();
      try {
        synchronized (this) {
          snapshot = getSnapshot();
          if (snapshot == null && !closing) {
            return;
          }
          if (snapshot != null) {
            snapshotTime = snapshot.getTimestamp();
          }

          // roll WAL
          oldLog = currentLog;
          if (!closing) {
            currentLog = persistor.createLog(snapshot.getTimestamp());
          }
        }
        // there may not be an existing log on startup
        if (oldLog != null) {
          oldLog.close();
        }
      } finally {
        this.logWriteLock.unlock();
      }
View Full Code Here

Examples of com.cetsoft.imcache.cache.heap.tx.TransactionLog

   * java.lang.Object)
   */
  public void put(K key, V value) {
    V exValue = super.get(key);
    super.put(key, value);
    TransactionLog log = new PutTransactionLog<K, V>(cache, committer, key, value, exValue);
    CacheTransaction.addLog(log);
  }
View Full Code Here

Examples of com.cetsoft.imcache.cache.heap.tx.TransactionLog

   * @see com.cetsoft.imcache.cache.heap.HeapCache#put(java.lang.Object, java.lang.Object)
   */
  public void put(K key, V value) {
    V exValue = super.get(key);
    super.put(key, value);
    TransactionLog log = new PutTransactionLog<K, V>(cache, committer, key, value, exValue);
    CacheTransaction.addLog(log);
  }
View Full Code Here

Examples of com.continuuity.tephra.persist.TransactionLog

  }

  private void doSnapshot(boolean closing) throws IOException {
    long snapshotTime = 0L;
    TransactionSnapshot snapshot = null;
    TransactionLog oldLog = null;
    try {
      this.logWriteLock.lock();
      try {
        synchronized (this) {
          snapshot = getSnapshot();
          if (snapshot == null && !closing) {
            return;
          }
          if (snapshot != null) {
            snapshotTime = snapshot.getTimestamp();
          }

          // roll WAL
          oldLog = currentLog;
          if (!closing) {
            currentLog = persistor.createLog(snapshot.getTimestamp());
          }
        }
        // there may not be an existing log on startup
        if (oldLog != null) {
          oldLog.close();
        }
      } finally {
        this.logWriteLock.unlock();
      }
View Full Code Here

Examples of com.continuuity.tephra.persist.TransactionLog

  }

  private void doSnapshot(boolean closing) throws IOException {
    long snapshotTime = 0L;
    TransactionSnapshot snapshot = null;
    TransactionLog oldLog = null;
    try {
      this.logWriteLock.lock();
      try {
        synchronized (this) {
          snapshot = getSnapshot();
          if (snapshot == null && !closing) {
            return;
          }
          if (snapshot != null) {
            snapshotTime = snapshot.getTimestamp();
          }

          // roll WAL
          oldLog = currentLog;
          if (!closing) {
            currentLog = persistor.createLog(snapshot.getTimestamp());
          }
        }
        // there may not be an existing log on startup
        if (oldLog != null) {
          oldLog.close();
        }
      } finally {
        this.logWriteLock.unlock();
      }
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.TransactionLog

    }

    protected abstract String getResultFileName();

    public long testTransactionLog(int workers, int xidCount) throws Exception {
        TransactionLog transactionLog = createTransactionLog();

        xid = new XidImpl2(new byte[Xid.MAXGTRIDSIZE]);
        //TODO Supply an actual list
        names = Collections.EMPTY_LIST;
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.TransactionLog

    }

    protected abstract String getResultFileName();

    public long testTransactionLog(int workers, int xidCount) throws Exception {
        TransactionLog transactionLog = createTransactionLog();

        xid = new XidImpl2(new byte[Xid.MAXGTRIDSIZE]);
        //TODO Supply an actual list
        names = Collections.EMPTY_LIST;
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.TransactionLog

                                                    int maxBuffers,
                                                    int maxLogFiles,
                                                    int minBuffers,
                                                    int threadsWaitingForceThreshold) throws Exception {
        XidFactory xidFactory = null;
        TransactionLog txLog = null;
        if (txRecovery) {
            SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper());
           
            xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID: tmId);
            txLog = new HOWLLog(bufferClassName == null ? "org.apache.howl.log.BlockLogBuffer" : bufferClassName,
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.TransactionLog

                                                    int maxBuffers,
                                                    int maxLogFiles,
                                                    int minBuffers,
                                                    int threadsWaitingForceThreshold) throws Exception {
        XidFactory xidFactory = null;
        TransactionLog txLog = null;
        if (txRecovery) {
            SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper());
           
            xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID: tmId);
            txLog = new HOWLLog(bufferClassName == null ? "org.apache.howl.log.BlockLogBuffer" : bufferClassName,
View Full Code Here

Examples of org.apache.geronimo.transaction.manager.TransactionLog

                                                    int maxBuffers,
                                                    int maxLogFiles,
                                                    int minBuffers,
                                                    int threadsWaitingForceThreshold) throws Exception {
        XidFactory xidFactory = null;
        TransactionLog txLog = null;
        if (txRecovery) {
            SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper());
           
            xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID: tmId);
            txLog = new HOWLLog(bufferClassName == null ? "org.apache.howl.log.BlockLogBuffer" : bufferClassName,
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.