transaction
Class LogManager
java.lang.Object
transaction.LogManager
public class LogManager
- extends java.lang.Object
A simple log manager which logs operations on a ResourceManager
in memory.
- Author:
- bross
Constructor Summary |
LogManager(java.lang.String workingDir)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogManager
public LogManager(java.lang.String workingDir)
throws java.io.IOException
- Throws:
java.io.IOException
log
public boolean log(int xid,
java.lang.String resourceID,
LogEntry.LogType type,
ResourceData afterImage,
java.lang.String reservation)
getLogEntries
public java.util.LinkedList<LogEntry> getLogEntries(int xid)
persistLogs
public void persistLogs(int xid)
throws java.io.IOException
- Throws:
java.io.IOException
deleteLogsForTransaction
public void deleteLogsForTransaction(int xid)
insertedResource
public ResourceData insertedResource(int xid,
java.lang.String rid)
insertedCustomer
public boolean insertedCustomer(int xid,
java.lang.String rid)
getReservations
public java.util.Set<java.lang.String> getReservations(int xid,
java.lang.String customer)
getLatestUpdate
public ResourceData getLatestUpdate(int xid,
java.lang.String rid)
getLatestResourceUpdates
public java.util.Map<java.lang.String,ResourceData> getLatestResourceUpdates(int xid)