/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { // final Properties properties = conn.getProperties(); final AbstractTripleStore tripleStore = conn.getTripleStore(); if (Boolean.valueOf(tripleStore.getProperty( BigdataSail.Options.HISTORY_SERVICE, BigdataSail.Options.DEFAULT_HISTORY_SERVICE))) { conn.addChangeLog(new HistoryChangeLogListener(conn)); } }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { // final Properties properties = conn.getProperties(); final AbstractTripleStore tripleStore = conn.getTripleStore(); if (Boolean.valueOf(tripleStore.getProperty( BigdataSail.Options.HISTORY_SERVICE, BigdataSail.Options.DEFAULT_HISTORY_SERVICE))) { conn.addChangeLog(new HistoryChangeLogListener(conn)); } }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { /** * TODO This really should not be using getCacheConnection() but rather * getExistingCacheConnection(). I need to figure out the pattern that * brings the cache connection into existence and who is responsible for * invoking it. The problem is that there are multiple entry points, * including AST evaluation, the DescribeServlet, and the test suite. * AST2BOpContext does this, but it is not always created before we need * the cache connection. */ final ICacheConnection cacheConn = CacheConnectionFactory .getCacheConnection(conn.getBigdataSail().getQueryEngine()); if (cacheConn == null) { // Cache is not enabled. return; } final AbstractTripleStore tripleStore = conn.getTripleStore(); final IDescribeCache describeCache = cacheConn.getDescribeCache( tripleStore.getNamespace(), tripleStore.getTimestamp()); if (describeCache == null) { // DESCRIBE cache is not enabled. return; } conn.addChangeLog(new DescribeCacheChangeLogListener(describeCache)); }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { /** * TODO This really should not be using getCacheConnection() but rather * getExistingCacheConnection(). I need to figure out the pattern that * brings the cache connection into existence and who is responsible for * invoking it. The problem is that there are multiple entry points, * including AST evaluation, the DescribeServlet, and the test suite. * AST2BOpContext does this, but it is not always created before we need * the cache connection. */ final ICacheConnection cacheConn = CacheConnectionFactory .getCacheConnection(conn.getBigdataSail().getQueryEngine()); if (cacheConn == null) { // Cache is not enabled. return; } final AbstractTripleStore tripleStore = conn.getTripleStore(); final IDescribeCache describeCache = cacheConn.getDescribeCache( tripleStore.getNamespace(), tripleStore.getTimestamp()); if (describeCache == null) { // DESCRIBE cache is not enabled. return; } conn.addChangeLog(new DescribeCacheChangeLogListener(describeCache)); }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { final AbstractTripleStore database = conn.getTripleStore(); if (database.isRDRHistory()) { final RDRHistory history = database.getRDRHistoryInstance(); history.init(); conn.addChangeLog(history); } }
protected BigdataSailConnection getUnisolatedSailConnection() throws SailException, InterruptedException { // Wrap with SAIL. final BigdataSail sail = new BigdataSail(namespace, getIndexManager()); sail.initialize(); final BigdataSailConnection conn = sail.getUnisolatedConnection(); // Setup a change listener. It will notice the #of mutations. conn.addChangeLog(new SailChangeLog()); return conn; }
/** * Register an {@link IChangeLog} listener that will manage the maintenance * of the describe cache. */ @Override public void startConnection(final BigdataSailConnection conn) { final AbstractTripleStore database = conn.getTripleStore(); if (database.isRDRHistory()) { final RDRHistory history = database.getRDRHistoryInstance(); history.init(); conn.addChangeLog(history); } }
/** * Set the change log on the SAIL connection. See {@link IChangeLog} and * {@link IChangeRecord}. * * @param log * the change log */ public void addChangeLog(final IChangeLog log) { getSailConnection().addChangeLog(log); }
/** * Set the change log on the SAIL connection. See {@link IChangeLog} and * {@link IChangeRecord}. * * @param log * the change log */ public void addChangeLog(final IChangeLog log) { getSailConnection().addChangeLog(log); }
protected BigdataSailConnection getUnisolatedSailConnection() throws SailException, InterruptedException { // Wrap with SAIL. final BigdataSail sail = new BigdataSail(namespace, getIndexManager()); sail.initialize(); final BigdataSailConnection conn = sail.getUnisolatedConnection(); // Setup a change listener. It will notice the #of mutations. conn.addChangeLog(new SailChangeLog()); return conn; }