ehcache

net.sf.ehcache.transaction
Class SoftLockHelper

java.lang.Object
  extended by net.sf.ehcache.transaction.SoftLockHelper

public class SoftLockHelper
extends Object

A helper class containing the logic to commit or rollback a soft lock in a store.

Author:
Ludovic Orban

Constructor Summary
SoftLockHelper()
           
 
Method Summary
static void commit(SoftLock softLock, Store underlyingStore, ElementValueComparator comparator)
          Commit a soft lock.
static void rollback(SoftLock softLock, Store underlyingStore, ElementValueComparator comparator)
          Rollback a soft lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftLockHelper

public SoftLockHelper()
Method Detail

commit

public static void commit(SoftLock softLock,
                          Store underlyingStore,
                          ElementValueComparator comparator)
Commit a soft lock.

Parameters:
softLock - the soft lock to commit.
underlyingStore - the underlying store.
comparator - the element value comparator.

rollback

public static void rollback(SoftLock softLock,
                            Store underlyingStore,
                            ElementValueComparator comparator)
Rollback a soft lock.

Parameters:
softLock - the soft lock to commit.
underlyingStore - the underlying store.
comparator - the element value comparator.
See Also:
phase 1 rollback of the 2PC implementation

ehcache

Copyright © 2003-2014 Terracotta, Inc.. All Rights Reserved.