Sets an event definition for the timer with a time cycle.

@param timerCycle the time cycle of the timer
@return the builder object
436937
public B timerWithCycle(String timerCycle) {
    TimeCycle timeCycle = createInstance(TimeCycle.class);
    timeCycle.setTextContent(timerCycle);

    TimerEventDefinition timerEventDefinition = createInstance(TimerEventDefinition.class);
    timerEventDefinition.setTimeCycle(timeCycle);

    element.getEventDefinitions().add(timerEventDefinition);

    return myself;
  }
816442
public ErrorEventDefinitionBuilder errorEventDefinition() {
    ErrorEventDefinition errorEventDefinition = createEmptyErrorEventDefinition();
    element.getEventDefinitions().add(errorEventDefinition);
    return new ErrorEventDefinitionBuilder(modelInstance, errorEventDefinition);
  }
562662
void addChronoChangedListener(Consumer<Chronology> listener) {
        if (chronoListeners == null) {
            chronoListeners = new ArrayList<Consumer<Chronology>>();
        }
        chronoListeners.add(listener);
    }
287122
public void setEventTypeCodes(java.util.Collection<String> eventTypeCodes) {
        if (eventTypeCodes == null) {
            this.eventTypeCodes = null;
            return;
        }

        this.eventTypeCodes = new java.util.ArrayList<String>(eventTypeCodes);
    }
712826
public static Timer timer(Metrics metrics, String component, String methodName) {
    if (metrics != null) {
      return metrics.getTimer(component, methodName);
    } else {
      return null;
    }
  }
325643
public CircuitBreakerBuilder trialRequestInterval(Duration trialRequestInterval) {
        requireNonNull(trialRequestInterval, "trialRequestInterval");
        if (trialRequestInterval.isNegative() || trialRequestInterval.isZero()) {
            throw new IllegalArgumentException(
                    "trialRequestInterval: " + trialRequestInterval + " (expected: > 0)");
        }
        this.trialRequestInterval = trialRequestInterval;
        return this;
    }
805692
public static Timer setInterval(int milliseconds, TimerCallback callback) {
		IntervalTimer interval = new IntervalTimer();
		interval.setId(nativeSetInterval(milliseconds, callback, interval));
		return interval;
	}
864368
public void registerTimerService(String id, TimerService timerService) {   
        if (timerService instanceof GlobalTimerService) {
            ((GlobalTimerService) timerService).setTimerServiceId(id);
        }
        this.registeredServices.put(id, timerService);
    }
91983
@SuppressWarnings("unchecked")
    @PostConstruct
    void init(BeanContext beanContext, ThreadFactory threadFactory) {
        try {
            BeanDefinition<ExecutorService> beanDefinition = beanContext.getBeanDefinition(ExecutorService.class, Qualifiers.byName(TaskExecutors.SCHEDULED));
            Collection<BeanCreatedEventListener> schedulerCreateListeners =
                    beanContext.getBeansOfType(BeanCreatedEventListener.class, Qualifiers.byTypeArguments(ScheduledExecutorService.class));

            Schedulers.addExecutorServiceDecorator(Environment.MICRONAUT, (scheduler, scheduledExecutorService) -> {
                for (BeanCreatedEventListener schedulerCreateListener : schedulerCreateListeners) {
                    Object newBean = schedulerCreateListener.onCreated(new BeanCreatedEvent(beanContext, beanDefinition, BeanIdentifier.of("reactor-" + scheduler.getClass().getSimpleName()), scheduledExecutorService));
                    if (!(newBean instanceof ScheduledExecutorService)) {
                        throw new BeanContextException("Bean creation listener [" + schedulerCreateListener + "] should return ScheduledExecutorService, but returned " + newBean);
                    }
                    scheduledExecutorService = (ScheduledExecutorService) newBean;
                }
                return scheduledExecutorService;
            });
        } catch (Exception e) {
            if (LOG.isErrorEnabled()) {
                LOG.error("Could not instrument Reactor for Tracing: " + e.getMessage(), e);
            }
        }
    }
1317101
public TimerScheduleType<TimerType<T>> getOrCreateSchedule()
   {
      Node node = childNode.getOrCreate("schedule");
      TimerScheduleType<TimerType<T>> schedule = new TimerScheduleTypeImpl<TimerType<T>>(this, "schedule", childNode, node);
      return schedule;
   }
22971
public void setResourceCalendar(ProjectCalendar calendar)
   {
      set(ResourceField.CALENDAR, calendar);
      if (calendar == null)
      {
         setResourceCalendarUniqueID(null);
      }
      else
      {
         calendar.setResource(this);
         setResourceCalendarUniqueID(calendar.getUniqueID());
      }
   }
754854
public static EventEngine getEventService() {
        CHFWBundle c = instance.get().get();
        if (null != c) {
            return c.eventService;
        }
        return null;
    }
87847
@SuppressWarnings("unchecked")
  public <T> Listener<T> onEvent(String event, Consumer listener) {
    Set<Consumer> listeners = eventListeners.computeIfAbsent(event, e -> new CopyOnWriteArraySet<>());
    listeners.add(listener);
    return new Listener<T>() {
      @Override
      public void accept(T event) {
        listener.accept(event);
      }
      @Override
      public void close() {
        listeners.remove(listener);
      }
    };
  }
352679
public final Cache2kBuilder<K, V> timeReference(TimeReference v) {
    config().setTimeReference(new CustomizationReferenceSupplier<TimeReference>(v));
    return this;
  }
1016422
public static Timer newTimer(String name, TimeUnit unit, TaggingContext context) {
    final MonitorConfig config = MonitorConfig.builder(name).build();
    return new ContextualTimer(config, context, new TimerFactory(unit));
  }
187826
public void setCalendar(Calendar calendar) {
		if (calendar == null) {
			dateEditor.setDate(null);
		} else {
			dateEditor.setDate(calendar.getTime());
		}
	}
1245254
private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
                               EventImpl<K, V> e, K key, V value, boolean pre, InvocationContext ctx) {
      e.setPre(pre);
      e.setKey(convertKey(listenerInvocation, key));
      e.setValue(convertValue(listenerInvocation, value));
      e.setOriginLocal(ctx.isOriginLocal());
      setTx(ctx, e);
   }