org.netbeans.mdr.persistence.btreeimpl.btreestorage
Class TransactionCache

java.lang.Object
  extended by org.netbeans.mdr.persistence.btreeimpl.btreestorage.TransactionCache

public class TransactionCache
extends java.lang.Object


Nested Class Summary
 class TransactionCache.CacheIterator
           
static class TransactionCache.Record
           
 
Field Summary
static byte OP_DELETE
           
static byte OP_INSERT
           
static byte OP_REPLACE
           
 
Constructor Summary
TransactionCache()
           
 
Method Summary
 void addDeleted(MOFID id)
          adds one delete operation
 void addInserted(MOFID id, byte[] value)
          adds one insert operation
 void addReplaced(MOFID id, byte[] value)
          adds one replace operation
 void clear()
          Resets cache (to store no operations).
 void commit()
          Commits operations temporarly stored in @link #operations.
 boolean containsCommitedData()
           
 TransactionCache.CacheIterator iterator()
          Returns cache iterator.
 boolean tresholdReached()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_INSERT

public static final byte OP_INSERT
See Also:
Constant Field Values

OP_DELETE

public static final byte OP_DELETE
See Also:
Constant Field Values

OP_REPLACE

public static final byte OP_REPLACE
See Also:
Constant Field Values
Constructor Detail

TransactionCache

public TransactionCache()
Method Detail

tresholdReached

public boolean tresholdReached()
Returns:
true if transaction cache treshold has been reached

containsCommitedData

public boolean containsCommitedData()
Returns:
true if cache stores some commited operations

clear

public void clear()
Resets cache (to store no operations).


addInserted

public void addInserted(MOFID id,
                        byte[] value)
adds one insert operation


addDeleted

public void addDeleted(MOFID id)
adds one delete operation


addReplaced

public void addReplaced(MOFID id,
                        byte[] value)
adds one replace operation


commit

public void commit()
Commits operations temporarly stored in @link #operations.


iterator

public TransactionCache.CacheIterator iterator()
Returns cache iterator.



Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.