public boolean equals(Object o) { boolean result = false; if (o instanceof Location) { result = compareTo((Location)o) == 0; } return result; }
private Location minimum(Location x, Location y) { Location min = null; if (x != null) { min = x; if (y != null) { int compare = y.compareTo(x); if (compare < 0) { min = y; } } } else { min = y; } return min; }
@SuppressWarnings("rawtypes") private void trackMaxAndMin(Location[] range, List<Operation> ops) { Location t = ops.get(0).getLocation(); if (range[0] == null || t.compareTo(range[0]) <= 0) { range[0] = t; } t = ops.get(ops.size() -1).getLocation(); if (range[1] == null || t.compareTo(range[1]) >= 0) { range[1] = t; } }
/** * Called during index recovery to rebuild the index from the last known good location. For * entries that occur before the last known good position we just ignore then and move on. * * @param command * the command read from the Journal which should be used to update the index. * @param location * the location in the index where the command was read. * @param inDoubtlocation * the location in the index known to be the last time the index was valid. * * @throws IOException if an error occurs while recovering the index. */ protected void doRecover(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException { if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) { process(data, location); } }
/** * do minimal recovery till we reach the last inDoubtLocation * @param data * @param location * @param inDoubtlocation * @throws IOException */ void process(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException { if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) { process(data, location, (IndexAware) null); } else { // just recover producer audit data.visit(new Visitor() { @Override public void visit(KahaAddMessageCommand command) throws IOException { metadata.producerSequenceIdTracker.isDuplicate(command.getMessageId()); } }); } }
if (job.getLocation().compareTo(lastAppendLocation) >= 0) { if (scheduler.removeJobAtTime(tx, job.getJobId(), job.getNextTime())) { LOG.trace("Removed Job past last appened in the journal: {}", job.getJobId());
if (existing != null && existing.compareTo(location) == 0) {
cur.setDataFileId(dataFile.getDataFileId().intValue()); cur.setOffset(0); if (limit != null && cur.compareTo(limit) >= 0) { LOG.trace("reached limit: {} at: {}", limit, cur); return null;
if (messageKeys != null && messageKeys.location.compareTo(location) < 0) {
public boolean equals(Object o) { boolean result = false; if (o instanceof Location) { result = compareTo((Location)o) == 0; } return result; }
public boolean equals(Object o) { boolean result = false; if (o instanceof Location) { result = compareTo((Location)o) == 0; } return result; }
public boolean equals(Object o) { boolean result = false; if (o instanceof Location) { result = compareTo((Location)o) == 0; } return result; }
private Location minimum(Location x, Location y) { Location min = null; if (x != null) { min = x; if (y != null) { int compare = y.compareTo(x); if (compare < 0) { min = y; } } } else { min = y; } return min; }
private Location minimum(Location x, Location y) { Location min = null; if (x != null) { min = x; if (y != null) { int compare = y.compareTo(x); if (compare < 0) { min = y; } } } else { min = y; } return min; }
private Location minimum(Location x, Location y) { Location min = null; if (x != null) { min = x; if (y != null) { int compare = y.compareTo(x); if (compare < 0) { min = y; } } } else { min = y; } return min; }
@SuppressWarnings("rawtypes") private void trackMaxAndMin(Location[] range, List<Operation> ops) { Location t = ops.get(0).getLocation(); if (range[0] == null || t.compareTo(range[0]) <= 0) { range[0] = t; } t = ops.get(ops.size() -1).getLocation(); if (range[1] == null || t.compareTo(range[1]) >= 0) { range[1] = t; } }
@SuppressWarnings("rawtypes") private void trackMaxAndMin(Location[] range, List<Operation> ops) { Location t = ops.get(0).getLocation(); if (range[0] == null || t.compareTo(range[0]) <= 0) { range[0] = t; } t = ops.get(ops.size() -1).getLocation(); if (range[1] == null || t.compareTo(range[1]) >= 0) { range[1] = t; } }
@SuppressWarnings("rawtypes") private void trackMaxAndMin(Location[] range, List<Operation> ops) { Location t = ops.get(0).getLocation(); if (range[0] == null || t.compareTo(range[0]) <= 0) { range[0] = t; } t = ops.get(ops.size() -1).getLocation(); if (range[1] == null || t.compareTo(range[1]) >= 0) { range[1] = t; } }
/** * Called during index recovery to rebuild the index from the last known good location. For * entries that occur before the last known good position we just ignore then and move on. * * @param command * the command read from the Journal which should be used to update the index. * @param location * the location in the index where the command was read. * @param inDoubtlocation * the location in the index known to be the last time the index was valid. * * @throws IOException if an error occurs while recovering the index. */ protected void doRecover(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException { if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) { process(data, location); } }
/** * Called during index recovery to rebuild the index from the last known good location. For * entries that occur before the last known good position we just ignore then and move on. * * @param command * the command read from the Journal which should be used to update the index. * @param location * the location in the index where the command was read. * @param inDoubtlocation * the location in the index known to be the last time the index was valid. * * @throws IOException if an error occurs while recovering the index. */ protected void doRecover(JournalCommand<?> data, final Location location, final Location inDoubtlocation) throws IOException { if (inDoubtlocation != null && location.compareTo(inDoubtlocation) >= 0) { process(data, location); } }