Examples of watch()


Examples of org.apache.tapestry.annotations.Cached.watch()

      String calledField = transformation.addField(PRIVATE, "boolean", fieldName + "$called");
 
      Cached once = transformation.getMethodAnnotation(method, Cached.class);
      String bindingField = null;
      String bindingValueField = null;
      boolean watching = once.watch().length() > 0;
      if (watching) {
        // add fields to store the binding and the value
        bindingField = transformation.addField(PRIVATE, Binding.class.getCanonicalName(), fieldName + "$binding");
        bindingValueField = transformation.addField(PRIVATE, "java.lang.Object", fieldName + "$bindingValue");
View Full Code Here

Examples of org.apache.tapestry5.annotations.Cached.watch()

            }
        });

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(plasticClass, annotation.watch(), method);

        MethodAdvice advice = createAdvice(cacheField, factory);

        method.addAdvice(advice);
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.Cached.watch()

        FieldAccess fieldAccess = createPerThreadValueField(transformation, method);

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(transformation, annotation.watch(), method);

        ComponentMethodAdvice advice = createAdvice(fieldAccess, factory);

        method.addAdvice(advice);
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.Cached.watch()

            }
        });

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(plasticClass, annotation.watch(), method);

        MethodAdvice advice = createAdvice(cacheField, factory);

        method.addAdvice(advice);
    }
View Full Code Here

Examples of org.broadinstitute.gatk.utils.threading.ThreadPoolMonitor.watch()

    /** Blocks until a free slot appears in the thread queue. */
    protected void waitForFreeQueueSlot() {
        final ThreadPoolMonitor monitor = new ThreadPoolMonitor();
        synchronized (monitor) {
            threadPool.submit(monitor);
            monitor.watch();
        }
    }

    /**
     * Callback for adding reduce tasks to the run queue.
View Full Code Here

Examples of org.eclipse.sisu.peaberry.ServiceRegistry.watch()

      if (isConcurrent) {
        // now apply concurrent behaviour when watching single services
        serviceWatcher = new ConcurrentServiceWatcher<T>(imports, serviceWatcher);
      }

      serviceRegistry.watch(clazz, attributeFilter, serviceWatcher);
    }

    return imports;
  }
View Full Code Here

Examples of redis.clients.jedis.Jedis.watch()

        if (schemaKey == null) {
          final String doc = schema.toString();
          schemaKey = createSchemaKey(schema, doc);
          j.set(schemaKey + z, doc);
        }
        String watch = j.watch(row + v);
        if (!watch.equals("OK")) {
          return false;
        }
        String versionStr = j.get(row + v);
        if ((versionStr == null && version != 0) || // row missing but version set
View Full Code Here

Examples of redis.clients.jedis.Pipeline.watch()

        return pool.safelyReturn(jedis -> {
            int[] hashes = hash(value);
            String[] hashesString = encode(hashes);

            Pipeline p = jedis.pipelined();
            p.watch(keys.COUNTS_KEY, keys.BITS_KEY);

            List<Long> counts;
            List<Response<Long>> responses = new ArrayList<>(config().hashes());
            for (String position : hashesString) {
                responses.add(p.hincrBy(keys.COUNTS_KEY, position, -1));
View Full Code Here

Examples of redis.clients.jedis.Pipeline.watch()

                }
                Response<List<Object>> exec = p.exec();
                p.sync();
                if (exec.get() == null) {
                    p = jedis.pipelined();
                    p.watch(keys.COUNTS_KEY, keys.BITS_KEY);
                    Response<List<String>> hmget = p.hmget(keys.COUNTS_KEY, hashesString);
                    p.sync();
                    counts = hmget.get().stream().map(Long::valueOf).collect(Collectors.toList());
                } else {
                    return Collections.min(counts);
View Full Code Here

Examples of redis.clients.jedis.Pipeline.watch()

        return pool.safelyReturn(jedis -> {
            int[] hashes = hash(value);
            String[] hashesString = encode(hashes);

            Pipeline p = jedis.pipelined();
            p.watch(keys.COUNTS_KEY, keys.BITS_KEY);

            List<Long> counts;
            List<Response<Long>> responses = new ArrayList<>(config().hashes());
            for (String position : hashesString) {
                responses.add(p.hincrBy(keys.COUNTS_KEY, position, -1));
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.