Examples of DependencyTracker


Examples of com.volantis.xml.expression.impl.DependencyTracker

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        DependencyTracker tracker =
                new DependencyTrackerImpl();
        Dependency dependency = tracker.extractDependency();
        assertEquals(Cacheability.CACHEABLE, dependency.getCacheability());
        assertEquals(Period.INDEFINITELY, dependency.getTimeToLive());
        TestCaseAbstract.assertEquals(Freshness.FRESH, dependency.freshness(contextMock));
        try {
            dependency.revalidate(contextMock);
            fail("Did not detect invalid call to revalidate");
        } catch(IllegalStateException e) {
            // Expected.
        }

        // Add the dependency from the empty tracker to another, it should
        // be ignored by this tracker so it should behave just as if it only
        // had a single dependency added.
        tracker = new DependencyTrackerImpl();
        tracker.addDependency(dependency);
        tracker.addDependency(dependency1Mock);

        dependency = tracker.extractDependency();
        assertSame(dependency1Mock, dependency);
    }
View Full Code Here

Examples of com.volantis.xml.expression.impl.DependencyTracker

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        DependencyTracker tracker =
                new DependencyTrackerImpl();
        tracker.addDependency(dependency1Mock);
        Dependency aggregate = tracker.extractDependency();
        assertSame(dependency1Mock, aggregate);
    }
View Full Code Here

Examples of com.volantis.xml.expression.impl.DependencyTracker

                .returns(Freshness.REVALIDATE);

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        DependencyTracker tracker =
                new DependencyTrackerImpl();
        tracker.addDependency(dependency1Mock);
        tracker.addDependency(dependency2Mock);

        Dependency aggregate = tracker.extractDependency();

        Cacheability cacheability = aggregate.getCacheability();
        assertEquals(Cacheability.UNCACHEABLE, cacheability);

        Period timeToLive = aggregate.getTimeToLive();
View Full Code Here

Examples of edu.brown.hstore.txns.DependencyTracker

                LOG.debug(String.format("%s - Generating %s with prefetchable queries",
                          ts, TransactionInitRequest.class.getSimpleName()));
           
            // We also need to add our boy to its base partition's DependencyTracker
            // This is so that we can store the prefetch results when they come back
            DependencyTracker depTracker = hstore_site.getDependencyTracker(ts.getBasePartition());
            TransactionInitRequest.Builder[] builders = this.prefetchPlanner.plan(ts, procParams,
                                                                                  depTracker, fs);
           
            // If the PrefetchQueryPlanner returns a null array, then there is nothing
            // that we can actually prefetch, so we'll just send the normal txn init requests
View Full Code Here

Examples of edu.brown.hstore.txns.DependencyTracker

   
    public void addPartitionExecutor(int partition, PartitionExecutor executor) {
        assert(this.shutdown_state != ShutdownState.STARTED);
        assert(executor != null);
        this.executors[partition] = executor;
        this.depTrackers[partition] = new DependencyTracker(executor);
        this.executors[partition].initHStoreSite(this);
    }
View Full Code Here

Examples of edu.brown.hstore.txns.DependencyTracker

                      ts, input_dep_id));

        // If the Transaction is on the same HStoreSite, then all the
        // input dependencies will be internal and can be retrieved locally
        if (ts instanceof LocalTransaction) {
            DependencyTracker txnTracker = null;
            if (ts.getBasePartition() != this.partitionId) {
                txnTracker = hstore_site.getDependencyTracker(ts.getBasePartition());
            } else {
                txnTracker = this.depTracker;
            }
            List<VoltTable> deps = txnTracker.getInternalDependency((LocalTransaction)ts, input_dep_id);
            assert(deps != null);
            assert(inputs.containsKey(input_dep_id) == false);
            inputs.put(input_dep_id, deps);
            if (trace.val)
                LOG.trace(String.format("%s - Retrieved %d INTERNAL VoltTables for DependencyId #%d",
View Full Code Here

Examples of edu.brown.hstore.txns.DependencyTracker

            if (status == Status.OK) {
                if (trace.val)
                    LOG.trace(String.format("%s - Storing %d dependency results locally for successful work fragment",
                              ts, result.size()));
                assert(result.size() == outputDepIds.length);
                DependencyTracker otherTracker = this.hstore_site.getDependencyTracker(ts.getBasePartition());
                for (int i = 0; i < outputDepIds.length; i++) {
                    if (trace.val)
                        LOG.trace(String.format("%s - Storing DependencyId #%d [numRows=%d]\n%s",
                                  ts, outputDepIds[i], result.dependencies[i].getRowCount(),
                                  result.dependencies[i]));
                    try {
                        otherTracker.addResult(local_ts, this.partitionId, outputDepIds[i], result.dependencies[i]);
                    } catch (Throwable ex) {
//                        ex.printStackTrace();
                        String msg = String.format("Failed to stored Dependency #%d for %s [idx=%d, fragmentId=%d]",
                                                   outputDepIds[i], ts, i, fragmentIds[i]);
                        LOG.error(String.format("%s - WorkFragment:%d\nExpectedIds:%s\nOutputDepIds: %s\nResultDepIds: %s\n%s",
View Full Code Here

Examples of edu.brown.hstore.txns.DependencyTracker

    private Map<String, Object> depTrackerInfo() {
        Map<String, Object> m = new LinkedHashMap<String, Object>();
        m.put("Dependency Trackers", null);
       
        for (int partition : hstore_site.getLocalPartitionIds()) {
            DependencyTracker depTracker = hstore_site.getDependencyTracker(partition);
            DependencyTracker.Debug depTrackerDbg = depTracker.getDebugContext();
           
            Map<String, Object> inner = new LinkedHashMap<String, Object>();
            boolean found = false;
            for (AbstractTransaction ts : siteDebug.getInflightTransactions()) {
                if ((ts instanceof LocalTransaction) == false ||
View Full Code Here

Examples of org.codehaus.groovy.tools.gse.DependencyTracker

                public void call(final SourceUnit source, GeneratorContext context, ClassNode classNode)
                        throws CompilationFailedException {
                    // GROOVY-4013: If it is an inner class, tracking its dependencies doesn't really
                    // serve any purpose and also interferes with the caching done to track dependencies
                    if (classNode instanceof InnerClassNode) return;
                    DependencyTracker dt = new DependencyTracker(source, cache);
                    dt.visitClass(classNode);
                }
            }, Phases.CLASS_GENERATION);

            final List<CompilationCustomizer> customizers = config.getCompilationCustomizers();
            if (customizers!=null) {
View Full Code Here

Examples of org.codehaus.groovy.tools.gse.DependencyTracker

                public void call(final SourceUnit source, GeneratorContext context, ClassNode classNode)
                        throws CompilationFailedException {
                    // GROOVY-4013: If it is an inner class, tracking its dependencies doesn't really
                    // serve any purpose and also interferes with the caching done to track dependencies
                    if (classNode instanceof InnerClassNode) return;
                    DependencyTracker dt = new DependencyTracker(source, cache);
                    dt.visitClass(classNode);
                }
            }, Phases.CLASS_GENERATION);
            return cu;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.