synchronized void destroy(Transaction tx) throws IOException { List<Long> keys = new ArrayList<Long>(); for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx); i.hasNext();) { Map.Entry<Long, List<JobLocation>> entry = i.next(); keys.add(entry.getKey()); List<JobLocation> values = entry.getValue(); if (values != null) { for (JobLocation jl : values) { this.store.decrementJournalCount(tx, jl.getLocation()); } } } for (Long l : keys) { this.index.remove(tx, l); } }
synchronized void destroy(Transaction tx, long start, long finish) throws IOException { List<Long> keys = new ArrayList<Long>(); for (Iterator<Map.Entry<Long, List<JobLocation>>> i = this.index.iterator(tx, start); i.hasNext();) { Map.Entry<Long, List<JobLocation>> entry = i.next(); if (entry.getKey().longValue() <= finish) { keys.add(entry.getKey()); List<JobLocation> values = entry.getValue(); if (values != null) { for (JobLocation jl : values) { this.store.decrementJournalCount(tx, jl.getLocation()); } } } else { break; } } for (Long l : keys) { this.index.remove(tx, l); } }
void remove(Transaction tx, long time) throws IOException { List<JobLocation> values = this.index.remove(tx, time); if (values != null) { for (JobLocation jl : values) { this.store.decrementJournalCount(tx, jl.getLocation()); } } }
void remove(Transaction tx, long time, String jobId) throws IOException { JobLocation result = removeFromIndex(tx, time, jobId); if (result != null) { this.store.decrementJournalCount(tx, result.getLocation()); } }