@SuppressWarnings("rawtypes") protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new RemoveOperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { updateIndex(tx, command, location); } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaAddMessageCommand command, final Location location, final IndexAware runWithIndexLock) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new AddOperation(command, location, runWithIndexLock)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { long assignedIndex = updateIndex(tx, command, location); if (runWithIndexLock != null) { runWithIndexLock.sequenceAssignedWithIndexLocked(assignedIndex); } } }); } finally { this.indexLock.writeLock().unlock(); } } }
protected void process(final KahaAddMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo(), location); inflightTx.add(new AddOpperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { public void execute(Transaction tx) throws IOException { upadateIndex(tx, command, location); } }); }finally { this.indexLock.writeLock().unlock(); } } }
protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo(), location); inflightTx.add(new RemoveOpperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { public void execute(Transaction tx) throws IOException { updateIndex(tx, command, location); } }); }finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaAddMessageCommand command, final Location location, final IndexAware runWithIndexLock) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new AddOperation(command, location, runWithIndexLock)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { long assignedIndex = updateIndex(tx, command, location); if (runWithIndexLock != null) { runWithIndexLock.sequenceAssignedWithIndexLocked(assignedIndex); } } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new RemoveOperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { updateIndex(tx, command, location); } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new RemoveOperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { updateIndex(tx, command, location); } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaRemoveMessageCommand command, final Location location) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new RemoveOperation(command, location)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { updateIndex(tx, command, location); } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaAddMessageCommand command, final Location location, final IndexAware runWithIndexLock) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new AddOperation(command, location, runWithIndexLock)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { long assignedIndex = updateIndex(tx, command, location); if (runWithIndexLock != null) { runWithIndexLock.sequenceAssignedWithIndexLocked(assignedIndex); } } }); } finally { this.indexLock.writeLock().unlock(); } } }
@SuppressWarnings("rawtypes") protected void process(final KahaAddMessageCommand command, final Location location, final IndexAware runWithIndexLock) throws IOException { if (command.hasTransactionInfo()) { List<Operation> inflightTx = getInflightTx(command.getTransactionInfo()); inflightTx.add(new AddOperation(command, location, runWithIndexLock)); } else { this.indexLock.writeLock().lock(); try { pageFile.tx().execute(new Transaction.Closure<IOException>() { @Override public void execute(Transaction tx) throws IOException { long assignedIndex = updateIndex(tx, command, location); if (runWithIndexLock != null) { runWithIndexLock.sequenceAssignedWithIndexLocked(assignedIndex); } } }); } finally { this.indexLock.writeLock().unlock(); } } }