public class Log
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static HGPersistentHandle |
LATEST_VERSION_HANDLE |
Constructor and Description |
---|
Log(HyperGraph logDb,
PeerInterface peerInterface) |
Modifier and Type | Method and Description |
---|---|
LogEntry |
addEntry(LogEntry entry,
java.util.Iterator<java.lang.Object> targets)
Adds an event to the log.
|
void |
confirmFromPeer(HGPeerIdentity targetId,
Timestamp timestamp) |
LogEntry |
createLogEntry(HGPersistentHandle handle,
java.lang.Object value,
StorageService.Operation operation) |
void |
finishRequest(HGPeerIdentity peerId,
Timestamp last_version,
Timestamp current_version) |
Timestamp |
getLastFrom(java.lang.Object peer) |
java.util.ArrayList<LogEntry> |
getLogEntries(Timestamp startingFrom,
HGAtomPredicate interest) |
void |
purge() |
boolean |
registerRequest(HGPeerIdentity peerId,
Timestamp last_version,
Timestamp current_version)
serializes messages from each peer.
|
public static final HGPersistentHandle LATEST_VERSION_HANDLE
public Log(HyperGraph logDb, PeerInterface peerInterface)
public LogEntry createLogEntry(HGPersistentHandle handle, java.lang.Object value, StorageService.Operation operation)
public LogEntry addEntry(LogEntry entry, java.util.Iterator<java.lang.Object> targets)
value
- peerFilter
- public void purge()
public void confirmFromPeer(HGPeerIdentity targetId, Timestamp timestamp)
public Timestamp getLastFrom(java.lang.Object peer)
public boolean registerRequest(HGPeerIdentity peerId, Timestamp last_version, Timestamp current_version)
current_version
- last_version
- public void finishRequest(HGPeerIdentity peerId, Timestamp last_version, Timestamp current_version)
public java.util.ArrayList<LogEntry> getLogEntries(Timestamp startingFrom, HGAtomPredicate interest)