Examples of second()


Examples of javax.ejb.ScheduleExpression.second()

    public void testEvery31stOfTheMonth() {
        ScheduleExpression every31st9_30_15_AM = this.getTimezoneSpecificScheduleExpression();
        every31st9_30_15_AM.dayOfMonth(31);
        every31st9_30_15_AM.hour(9);
        every31st9_30_15_AM.minute("30");
        every31st9_30_15_AM.second(15);

        CalendarBasedTimeout calendarTimeout = new CalendarBasedTimeout(every31st9_30_15_AM);

        Calendar firstTimeout = calendarTimeout.getFirstTimeout();
        Assert.assertNotNull(timeZoneDisplayName, firstTimeout);
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

    //@Test
    public void testSomeSpecificTime() {
        ScheduleExpression every0_15_30_Sec_At_9_30_PM = this.getTimezoneSpecificScheduleExpression();
        every0_15_30_Sec_At_9_30_PM.dayOfMonth(31);
        every0_15_30_Sec_At_9_30_PM.month("Nov-Feb");
        every0_15_30_Sec_At_9_30_PM.second("0,15,30");
        every0_15_30_Sec_At_9_30_PM.minute(30);
        every0_15_30_Sec_At_9_30_PM.hour("21");

        CalendarBasedTimeout calendarTimeout = new CalendarBasedTimeout(every0_15_30_Sec_At_9_30_PM);
        Calendar firstTimeout = calendarTimeout.getFirstTimeout();
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

    }

    //@Test
    public void testEvery10Seconds() {
        ScheduleExpression every10Secs = this.getTimezoneSpecificScheduleExpression();
        every10Secs.second("*/10");
        every10Secs.minute("*");
        every10Secs.hour("*");

        CalendarBasedTimeout calendarTimeout = new CalendarBasedTimeout(every10Secs);
        Calendar firstTimeout = calendarTimeout.getFirstTimeout();
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
                        scheduleExpression.minute(schedule.getMinute());
                        scheduleExpression.month(schedule.getMonth());
                        scheduleExpression.second(schedule.getSecond());
                        scheduleExpression.year(schedule.getYear());
                    }
                    if (timer.getEnd() != null) {
                        scheduleExpression.end(timer.getEnd().getTime());
                    }
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

    private final CountDownLatch timerExit = new CountDownLatch(1);


    public TimerHandle createTimer() {
        ScheduleExpression expression = new ScheduleExpression();
        expression.second("*");
        expression.minute("*");
        expression.hour("*");
        expression.dayOfMonth("*");
        expression.year("*");
        return timerService.createCalendarTimer(expression).getHandle();
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

    @Resource
    private TimerService timerService;

    public TimerHandle createTimer() {
        ScheduleExpression expression = new ScheduleExpression();
        expression.second("*");
        expression.minute("*");
        expression.hour("*");
        expression.dayOfMonth("*");
        expression.year("*");
        TimerConfig timerConfig = new TimerConfig();
View Full Code Here

Examples of javax.ejb.ScheduleExpression.second()

public class CalendarTimerBean extends AbstractTimerBean {

    @Override
    public void createTimer() {
        ScheduleExpression scheduleExpression = new ScheduleExpression();
        scheduleExpression.second(getSeconds());
        scheduleExpression.hour("*");
        scheduleExpression.minute("*");
        final TimerConfig timerConfig = new TimerConfig();
        timerConfig.setPersistent(super.persistent);
        timerConfig.setInfo(super.info);
View Full Code Here

Examples of org.apache.crunch.Pair.second()

            if (collection instanceof PTable) {
              for (Object o : collection.materialize()) {
                Pair p = (Pair) o;
                os.writeBytes(p.first().toString());
                os.writeBytes("\t");
                os.writeBytes(p.second().toString());
                os.writeBytes("\r\n");
              }
            } else {
              for (Object o : collection.materialize()) {
                os.writeBytes(o.toString() + "\r\n");
View Full Code Here

Examples of org.apache.crunch.Pair.second()

    assertEquals(tuple, newTuple);
    TupleObjectInspector<Pair> poi = new TupleObjectInspector<Pair>(TupleFactory.PAIR,
        Writables.strings(), Writables.ints());
    Pair pair = poi.create("word", 29);
    assertEquals("word", pair.first());
    assertEquals(29, pair.second());
  }
 
  @Test
  public void testByteBufferObjectInspector() {
    byte[] bytes = {0, 9, 4, 18, 64, 6, 1};
View Full Code Here

Examples of org.apache.crunch.Pair.second()

            if (collection instanceof PTable) {
              for (Object o : collection.materialize()) {
                Pair p = (Pair) o;
                os.writeBytes(p.first().toString());
                os.writeBytes("\t");
                os.writeBytes(p.second().toString());
                os.writeBytes("\r\n");
              }
            } else {
              for (Object o : collection.materialize()) {
                os.writeBytes(o.toString() + "\r\n");
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.