Examples of Frequency


Examples of org.apache.ivory.entity.v0.Frequency

            List<CoordinatorJob> applicableCoords = getApplicableCoords(entity,
                    client, start, end, bundles);
            List<CoordinatorAction> actions = new ArrayList<CoordinatorAction>();

            for (CoordinatorJob coord : applicableCoords) {
                Frequency freq = createFrequency(coord.getFrequency(),
                        coord.getTimeUnit());
                TimeZone tz = EntityUtil.getTimeZone(coord.getTimeZone());
                Date iterStart = EntityUtil.getNextStartTime(
                        coord.getStartTime(), freq, tz, start);
                final Date iterEnd = (coord.getNextMaterializedTime().before(end) ? coord.getNextMaterializedTime() : end);
                while (!iterStart.after(iterEnd)) {
                    int sequence = EntityUtil.getInstanceSequence(
                            coord.getStartTime(), freq, tz, iterStart);
                    String actionId = coord.getId() + "@" + sequence;
                    CoordinatorAction coordActionInfo = null;
                    try {
                        coordActionInfo = client.getCoordActionInfo(actionId);
                    } catch (OozieClientException e) {
                        LOG.debug("Unable to get action for " + actionId + " "
                                + e.getMessage());
                    }
                    if (coordActionInfo != null) {
                        actions.add(coordActionInfo);
                    }
                    Calendar startCal = Calendar.getInstance(EntityUtil
                            .getTimeZone(coord.getTimeZone()));
                    startCal.setTime(iterStart);
                    startCal.add(freq.getTimeUnit().getCalendarUnit(),
                            coord.getFrequency());
                    iterStart = startCal.getTime();
                }
            }
            actionsMap.put(cluster, actions);
View Full Code Here

Examples of org.boris.expr.function.excel.FREQUENCY

        assertEquals(eval(f, 30, toArray(6, 7, 9, 15, 21), toArray(20, 28, 31,
                38, 40)), 10.6072530864198);
    }

    public void testFREQUENCY() throws Exception {
        FREQUENCY f = new FREQUENCY();
        fail("FREQUENCY not implemented");
    }
View Full Code Here

Examples of org.jquantlib.time.Frequency

    final int issueMonths[] = { -24, -18, -12, -6, 0, 6, 12, 18, 24 };
    final int lengths[] = { 3, 5, 10, 15, 20 };
    final int settlementDays = 3;
    final double coupons[] = { 0.02, 0.05, 0.08 };
    final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual };
    final DayCounter bondDayCount = new Thirty360();
    final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted;
    final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing;
    final double redemption = 100.0;
View Full Code Here

Examples of org.jquantlib.time.Frequency

    final int maxEvaluations = 100;

    final int lengths[] = { 3, 5, 10, 15, 20 };
    final int settlementDays = 3;
    final double coupons[] = { 0.02, 0.05, 0.08 };
    final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual };
    final DayCounter bondDayCount = new Actual360();
    final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted;
    final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing;
    final double redemption = 100.0;
View Full Code Here

Examples of org.jquantlib.time.Frequency

    final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360()));

      // actual market values from the evaluation date

      final Frequency freq = Frequency.Semiannual;
      final Schedule sch1 = new Schedule(new Date(31, Month.October, 2004),
                    new Date(31, Month.October, 2006), new Period(freq), bondCalendar,
                    BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false);

      final FixedRateBond bond1 = new FixedRateBond(settlementDays, faceAmount, sch1,
View Full Code Here

Examples of org.onebusaway.gtfs.model.Frequency

  @Test
  public void testFrequencyLabelByRoute() {
    Trip tripA = new Trip();
    tripA.setId(_tripEntryA.getId());

    Frequency frequency = new Frequency();
    frequency.setTrip(tripA);
    frequency.setStartTime(time(7, 00));
    frequency.setEndTime(time(9, 00));
    frequency.setHeadwaySecs(600);
    frequency.setLabelOnly(1);

    Mockito.when(_dao.getAllFrequencies()).thenReturn(Arrays.asList(frequency));

    _graph.initialize();

    _factory.processFrequencies(_graph);

    FrequencyEntry frequencyEntry = _tripEntryA.getFrequencyLabel();
    assertNotNull(frequencyEntry);
    assertEquals(frequency.getStartTime(), frequencyEntry.getStartTime());
    assertEquals(frequency.getEndTime(), frequencyEntry.getEndTime());
    assertEquals(frequency.getHeadwaySecs(), frequencyEntry.getHeadwaySecs());

    assertSame(frequencyEntry, _tripEntryB.getFrequencyLabel());
    assertNull(_tripEntryC.getFrequencyLabel());
    assertSame(frequencyEntry, _tripEntryD.getFrequencyLabel());
  }
View Full Code Here

Examples of org.voltdb.compiler.deploymentfile.CommandLogType.Frequency

        org.voltdb.catalog.CommandLog config = catalog.getClusters().get("cluster").getLogconfig().get("log");
        if (commandlog != null) {
            logSizeMb = commandlog.getLogsize();
            sync = commandlog.isSynchronous();
            enabled = commandlog.isEnabled();
            Frequency freq = commandlog.getFrequency();
            if (freq != null) {
                long maxTxnsBeforeFsyncTemp = freq.getTransactions();
                if (maxTxnsBeforeFsyncTemp < 1 || maxTxnsBeforeFsyncTemp > Integer.MAX_VALUE) {
                    throw new RuntimeException("Invalid command log max txns before fsync (" + maxTxnsBeforeFsync
                            + ") specified. Supplied value must be between 1 and (2^31 - 1) txns");
                }
                maxTxnsBeforeFsync = (int)maxTxnsBeforeFsyncTemp;
                fsyncInterval = freq.getTime();
                if (fsyncInterval < 1 | fsyncInterval > 5000) {
                    throw new RuntimeException("Invalid command log fsync interval(" + fsyncInterval
                            + ") specified. Supplied value must be between 1 and 5000 milliseconds");
                }
            }
View Full Code Here

Examples of proj.zoie.hourglass.impl.HourGlassScheduler.FREQUENCY

        } else if (SENSEI_INDEXER_TYPE_HOURGLASS.equals(indexerType)) {
            String schedule = _senseiConf.getString(SENSEI_HOURGLASS_SCHEDULE, "");
            int trimThreshold = _senseiConf.getInt(SENSEI_HOURGLASS_TRIMTHRESHOLD, 14);
            String frequencyString = _senseiConf.getString(SENSEI_HOURGLASS_FREQUENCY, "day");

            FREQUENCY frequency;

            if (SENSEI_HOURGLASS_FREQUENCY_MIN.equals(frequencyString)) {
                frequency = FREQUENCY.MINUTELY;
            } else if (SENSEI_HOURGLASS_FREQUENCY_HOUR.equals(frequencyString)) {
                frequency = FREQUENCY.HOURLY;
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.