@Override public String toString() { return "oplog#" + getOplogId() /* + "DEBUG" + System.identityHashCode(this) */; // return this.parent.getName() + "#oplog#" + getOplogId() /* + "DEBUG" + System.identityHashCode(this) */; }
@Override public String toString() { return "oplog#" + getOplogId() /* + "DEBUG" + System.identityHashCode(this) */; }
public int compare(Object arg0, Object arg1) { return Long.signum(((Oplog)arg1).getOplogId() - ((Oplog)arg0).getOplogId()); } });
public int compare(Object arg0, Object arg1) { return Long.signum(((Oplog)arg1).getOplogId() - ((Oplog)arg0).getOplogId()); } });
void inactiveAccessed(Oplog oplog) { Long key = Long.valueOf(oplog.getOplogId()); synchronized (this.oplogIdToOplog) { // update last access time this.inactiveOplogs.get(key); } }
void removeDrf(Oplog oplog) { synchronized (this.oplogIdToOplog) { this.drfOnlyOplogs.remove(Long.valueOf(oplog.getOplogId())); } }
void inactiveAccessed(Oplog oplog) { Long key = Long.valueOf(oplog.getOplogId()); synchronized (this.oplogIdToOplog) { // update last access time this.inactiveOplogs.get(key); } }
void addDrf(Oplog oplog) { synchronized (this.oplogIdToOplog) { this.drfOnlyOplogs.put(Long.valueOf(oplog.getOplogId()), oplog); } }
void addDrf(Oplog oplog) { // logger.info(LocalizedStrings.DEBUG, "DEBUG addDrf oplog#" + // oplog.getOplogId()); synchronized (this.oplogIdToOplog) { this.drfOnlyOplogs.put(Long.valueOf(oplog.getOplogId()), oplog); } }
void removeDrf(Oplog oplog) { synchronized (this.oplogIdToOplog) { this.drfOnlyOplogs.remove(Long.valueOf(oplog.getOplogId())); } }
/** * Return true if this oplog is the oldest one of those ready to compact */ private boolean isOldest() { long myId = getOplogId(); return getOplogSet().isOldestExistingOplog(myId); }
/** * Return true if this oplog is the oldest one of those ready to compact */ private boolean isOldest() { long myId = getOplogId(); return getOplogSet().isOldestExistingOplog(myId); }
/** * Returns true if the given entry has not yet been written to this oplog. */ private boolean modNeedsKey(DiskEntry entry) { DiskId did = entry.getDiskId(); synchronized (did) { if (did.getOplogId() != getOplogId()) { // the last record for it was written in a different oplog // so we need the key. return true; } else { return false; } } }
/** * Returns true if the given entry has not yet been written to this oplog. */ private boolean modNeedsKey(DiskEntry entry) { DiskId did = entry.getDiskId(); synchronized (did) { if (did.getOplogId() != getOplogId()) { // the last record for it was written in a different oplog // so we need the key. return true; } else { return false; } } }
public void destroyAllOplogs() { // get a snapshot to prevent CME for (Oplog oplog : getAllOplogs()) { if (oplog != null) { oplog.destroy(); removeOplog(oplog.getOplogId()); } } }
public void destroyAllOplogs() { // get a snapshot to prevent CME for (Oplog oplog : getAllOplogs()) { if (oplog != null) { // logger.info(LocalizedStrings.DEBUG, "DEBUG destroying oplog=" + // oplog.getOplogId()); oplog.destroy(); removeOplog(oplog.getOplogId()); } } }
/** closes all the oplogs except the current one * */ private void closeOtherOplogs() { // get a snapshot to prevent CME Oplog[] oplogs = getAllOplogs(); // if there are oplogs which are to be compacted, destroy them // do not do oplogs[0] for (int i = 1; i < oplogs.length; i++) { oplogs[i].finishKrf(); oplogs[i].close(); removeOplog(oplogs[i].getOplogId()); } }
/** closes all the oplogs except the current one * */ private void closeOtherOplogs() { // get a snapshot to prevent CME Oplog[] oplogs = getAllOplogs(); // if there are oplogs which are to be compacted, destroy them // do not do oplogs[0] for (int i = 1; i < oplogs.length; i++) { oplogs[i].finishKrf(); oplogs[i].close(); removeOplog(oplogs[i].getOplogId()); } }
/** * The oplogId in re points to the oldOplogId. * "this" oplog is the current oplog. */ private void updateRecoveredEntry(DiskRegionView drv, DiskEntry de, DiskEntry.RecoveredEntry re) { if (getOplogId() != re.getOplogId()) { Oplog oldOplog = getOplogSet().getChild(re.getOplogId()); oldOplog.rmLive(drv, de); initRecoveredEntry(drv, de); } else { getDRI(drv).update(de); } }
/** * The oplogId in re points to the oldOplogId. "this" oplog is the current * oplog. */ private void updateRecoveredEntry(DiskRegionView drv, DiskEntry de, DiskEntry.RecoveredEntry re) { if (getOplogId() != re.getOplogId()) { Oplog oldOplog = getOplogSet().getChild(re.getOplogId()); oldOplog.rmLive(drv, de); initRecoveredEntry(drv, de); } else { getDRI(drv).update(de); } }