Examples of timeUnit()


Examples of cn.org.rapid_framework.cache.aop.annotation.MethodCache.timeUnit()

          String targetName = invocation.getThis().getClass().getName();
            String methodName = invocation.getMethod().getName()
            Object[] arguments = invocation.getArguments()
            MethodCache annotation = invocation.getMethod().getAnnotation(MethodCache.class);
            String cacheKey = getCackeKey(targetName, methodName, arguments,annotation);
            int expireSeconds = (int)annotation.timeUnit().toSeconds(annotation.expireTime());
            return getResult(cacheKey, invocation,expireSeconds);
        } else
            return invocation.proceed()
       
    }
View Full Code Here

Examples of net.paoding.rose.web.portal.PortalSetting.timeUnit()

        //
        long timeout = 0;
        PortalSetting portalSetting = inv.getMethod().getAnnotation(PortalSetting.class);
        if (portalSetting != null) {
            if (portalSetting.timeout() >= 0) {
                long annotationTimeout = portalSetting.timeUnit().toMillis(portalSetting.timeout());
                // < 0的情况,是PortalSetting的默认设置,即如果PortalSetting没有设置有效的timeout,则使用defaultTimeout策略
                // == 0的情况表示并且要求表示不需要设置超时时间,并且也不使用defaultTimeout策略
                if (annotationTimeout >= 0) {
                    timeout = annotationTimeout;
                }
View Full Code Here

Examples of org.apache.pig.builtin.MonitoredUDF.timeUnit()

    public MonitoredUDFExecutor(EvalFunc udf) {
        // is 10 enough? This is pretty arbitrary.
        exec = MoreExecutors.getExitingExecutorService(new ScheduledThreadPoolExecutor(10));
        this.evalFunc = udf;
        MonitoredUDF anno = udf.getClass().getAnnotation(MonitoredUDF.class);
        timeUnit = anno.timeUnit();
        duration = anno.duration();
        errorCallback = anno.errorCallback();

        // The exceptions really should not happen since our handlers are defined by the parent class which
        // must be extended by all custom handlers.
View Full Code Here

Examples of org.apache.pig.builtin.MonitoredUDF.timeUnit()

    public MonitoredUDFExecutor(EvalFunc udf) {
        // is 10 enough? This is pretty arbitrary.
        exec = MoreExecutors.listeningDecorator(MoreExecutors.getExitingExecutorService(new ScheduledThreadPoolExecutor(1)));
        this.evalFunc = udf;
        MonitoredUDF anno = udf.getClass().getAnnotation(MonitoredUDF.class);
        timeUnit = anno.timeUnit();
        duration = anno.duration();
        errorCallback = anno.errorCallback();

        // The exceptions really should not happen since our handlers are defined by the parent class which
        // must be extended by all custom handlers.
View Full Code Here

Examples of org.apache.pig.builtin.MonitoredUDF.timeUnit()

    public MonitoredUDFExecutor(EvalFunc udf) {
        // is 10 enough? This is pretty arbitrary.
        exec = MoreExecutors.getExitingExecutorService(new ScheduledThreadPoolExecutor(10));
        this.evalFunc = udf;
        MonitoredUDF anno = udf.getClass().getAnnotation(MonitoredUDF.class);
        timeUnit = anno.timeUnit();
        duration = anno.duration();
        errorCallback = anno.errorCallback();

        // The exceptions really should not happen since our handlers are defined by the parent class which
        // must be extended by all custom handlers.
View Full Code Here

Examples of org.apache.pig.builtin.MonitoredUDF.timeUnit()

    public MonitoredUDFExecutor(EvalFunc udf) {
        // is 10 enough? This is pretty arbitrary.
        exec = MoreExecutors.listeningDecorator(MoreExecutors.getExitingExecutorService(new ScheduledThreadPoolExecutor(1)));
        this.evalFunc = udf;
        MonitoredUDF anno = udf.getClass().getAnnotation(MonitoredUDF.class);
        timeUnit = anno.timeUnit();
        duration = anno.duration();
        errorCallback = anno.errorCallback();

        // The exceptions really should not happen since our handlers are defined by the parent class which
        // must be extended by all custom handlers.
View Full Code Here

Examples of org.atmosphere.annotation.Suspend.timeUnit()

       
        Suspend suspendAnnotation = ctx.getActionAnnotation(Suspend.class);
        if (suspendAnnotation != null) {
           
            long suspendTimeout = suspendAnnotation.period();
            TimeUnit tu = suspendAnnotation.timeUnit();
            suspendTimeout = translateTimeUnit(suspendTimeout, tu);
           
            Suspend.SCOPE scope = suspendAnnotation.scope();
            Class<? extends AtmosphereResourceEventListener>[] listeners =
                    suspendAnnotation.listeners();
View Full Code Here

Examples of org.jboss.errai.ioc.client.api.Timed.timeUnit()

      final Statement methodInvokation
          = InjectUtil.invokePublicOrPrivateMethod(ctx.getInjectionContext(), Refs.get("beanInstance"),
          ctx.getMethod());

      final org.jboss.errai.common.client.util.TimeUnit timeUnit = timed.timeUnit();
      final int interval = timed.interval();

      final Statement timerDecl
          = Stmt.nestedCall(Stmt.newObject(Timer.class).extend()
          .publicOverridesMethod("run")
View Full Code Here

Examples of org.openntf.domino.xots.annotations.Schedule.timeunit()

  }

  public void schedule(final Class<? extends Runnable> taskClass) {
    Schedule schedule = taskClass.getAnnotation(Schedule.class);
    if (schedule != null) {
      schedule.timeunit();
    }
  }

  public void queue(final Runnable runnable) {
    queue(runnable, runnable.getClass().getClassLoader());
View Full Code Here

Examples of org.seleniumhq.selenium.fluent.Period.timeUnit()

public class PeriodTest {

    @Test
    public void testMillis() {
        Period period = Period.millis(123);
        assertThat(period.timeUnit(), equalTo(TimeUnit.MILLISECONDS));
        assertThat(period.howLong(), equalTo(123));
        assertThat(period.toString(), equalTo("millis(123)"));
    }

    @Test
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.