/** * Extended to shutdown the embedded transaction service. */ @Override public void shutdown() { ((JournalTransactionService) getTransactionService()) .shutdown(); super.shutdown(); }
/** * Extended to shutdown the embedded transaction service. */ @Override public void shutdownNow() { ((JournalTransactionService) getTransactionService()) .shutdownNow(); super.shutdownNow(); }
/** * Extends the basic behavior to force a commit of the {@link Journal}. * This makes the {@link Journal} appear to have "auto-commit" semantics * from the perspective of the unit tests that are written to the assumption * that the {@link IIndexManager} is an {@link IBigdataFederation}. * Otherwise those unit tests tend not to force a commit and hence * restart-safe tests tend to fail for one reason or another. */ protected Journal reopenStore(final Journal store) { store.commit(); return super.reopenStore(store); }
@Override public ByteBuffer read(final long addr) { assertOpen(); assertCanRead(); return _bufferStrategy.read(addr); }
@Override final public File getFile() { final IBufferStrategy tmp = getBufferStrategy(); if (tmp == null) return null; return tmp.getFile(); }
/** * The last commit time from the current root block. */ @Override final public long getLastCommitTime() { return journal.getRootBlockView().getLastCommitTime(); }
@Override public void force(final boolean metadata) { assertOpen(); _bufferStrategy.force(metadata); }
/** * Open/create an {@link IIndexManager} using the properties reported by * {@link #getProperties()}. */ public S getStore() { return getOurDelegate().getStore(getProperties()); }
/** * Verify that a NOP state change is allowed (this is used when there are * multiple committers for a distributed transaction since (as a * convenience) more than one may instruct us to make the same state * change). */ public void test_selfTransitionOk() { assertTrue(RunState.Active.isTransitionAllowed(RunState.Active)); assertTrue(RunState.Prepared.isTransitionAllowed(RunState.Prepared)); assertTrue(RunState.Committed.isTransitionAllowed(RunState.Committed)); assertTrue(RunState.Aborted.isTransitionAllowed(RunState.Aborted)); }
/** * Hook invoked by group commit on success/failure. It is invoked from * within the group commit for each task which joins the commit group along * either the code path where the commit succeeds or the code path where it * fails. The boolean argument indicates whether or not the group commit * succeeded. Throws exceptions are trapped and logged. */ void afterTaskHook(final boolean abort) { ((IsolatedActionJournal) getJournal()).completeTask(); }
/** * Open/create an {@link IIndexManager} using the given properties. * <p> * {@inheritDoc} */ @Override public S getStore(Properties properties) { return getOurDelegate().getStore(properties); }
@Override public void delete(final long addr) { assertCanWrite(); _bufferStrategy.delete(addr); }
@Override public Result doComparisonTest(final Properties properties) throws Exception { setUpComparisonTest(properties); return super.doComparisonTest(properties); }
/** * Close the {@link IIndexManager} and re-open an {@link IIndexManager} * backed by the same persistent storage. * <p> * {@inheritDoc} */ @Override public S reopenStore(S store) { return getOurDelegate().reopenStore(store); }
@Override public IPSOutputStream getOutputStream() { assertCanWrite(); return _bufferStrategy.getOutputStream(); }
/** * Discard any allocations for writes on unisolated indices touched by the * task for an {@link ITx#UNISOLATED} which fails, but while the task still * has its locks. */ private void abortTask() { ((IsolatedActionJournal) getJournal()).abortContext(); }
/** * Extended to discard the write cache. * <p> * Note: The file is NOT closed and re-opened in a read-only mode in order * to avoid causing difficulties for concurrent readers. */ public void closeForWrites() { // sets the [readOnly] flag. super.closeForWrites(); // discard the write cache. releaseWriteCache(); }
/** * Extended to shutdown the embedded transaction service. */ @Override public void shutdownNow() { ((JournalTransactionService) getTransactionService()) .shutdownNow(); super.shutdownNow(); }
/** * Extended to shutdown the embedded transaction service. */ @Override public void shutdown() { ((JournalTransactionService) getTransactionService()) .shutdown(); super.shutdown(); }