Examples of currentTimeMillis()


Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.currentTimeMillis()

    HRegionLocation diffLocation = new HRegionLocation(ri, new ServerName("127.0.0.1", 2, 0));

    ManualEnvironmentEdge timeMachine = new ManualEnvironmentEdge();
    EnvironmentEdgeManager.injectEdge(timeMachine);
    try {
      long timeBase = timeMachine.currentTimeMillis();
      long largeAmountOfTime = ANY_PAUSE * 1000;
      HConnectionManager.ServerErrorTracker tracker =
          new HConnectionManager.ServerErrorTracker(largeAmountOfTime);

      // The default backoff is 0.
View Full Code Here

Examples of org.apache.hadoop.hbase.util.ManualEnvironmentEdge.currentTimeMillis()

    HRegionLocation diffLocation = new HRegionLocation(ri, ServerName.valueOf("127.0.0.1", 2, 0));

    ManualEnvironmentEdge timeMachine = new ManualEnvironmentEdge();
    EnvironmentEdgeManager.injectEdge(timeMachine);
    try {
      long timeBase = timeMachine.currentTimeMillis();
      long largeAmountOfTime = ANY_PAUSE * 1000;
      HConnectionManager.ServerErrorTracker tracker =
          new HConnectionManager.ServerErrorTracker(largeAmountOfTime, 100);

      // The default backoff is 0.
View Full Code Here

Examples of org.apache.shindig.common.util.FakeTimeSource.currentTimeMillis()

        .addHeader("h2", "v2").addHeader("Cache-Control", "private,no-store,max-age=10")
        .addHeader("Expires", "123").create();

    HttpServletResponse servletResponse = EasyMock.createMock(HttpServletResponse.class);
    HttpServletResponseRecorder recorder = new HttpServletResponseRecorder(servletResponse);
    long testStartTime = fakeTime.currentTimeMillis();
    ServletUtil.copyToServletResponseAndOverrideCacheHeaders(response, recorder);
    assertEquals(200, recorder.getHttpStatusCode());
    assertEquals("response string", recorder.getResponseAsString());
    assertEquals("v1", recorder.getHeader("h1"));
    assertEquals("v2", recorder.getHeader("h2"));
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

                index().stage(getProgressListener(), diff, 0);

                // write new tree
                ObjectId newTreeId = command(WriteTree2.class).call();

                long timestamp = platform.currentTimeMillis();
                // Create new commit
                CommitBuilder builder = new CommitBuilder(commitToApply);
                builder.setParentIds(Arrays.asList(rebaseHead));
                builder.setTreeId(newTreeId);
                builder.setCommitterTimestamp(timestamp);
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

            }
        } else {
            // write new tree
            ObjectId newTreeId = command(WriteTree2.class).call();

            long timestamp = platform.currentTimeMillis();
            // Create new commit
            CommitBuilder builder = new CommitBuilder(commitToApply);
            builder.setParentIds(Arrays.asList(rebaseHead));
            builder.setTreeId(newTreeId);
            builder.setCommitterTimestamp(timestamp);
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

        String taggerName = name.get();
        String taggerEmail = email.get();

        Platform platform = platform();
        long taggerTimeStamp = platform.currentTimeMillis();
        int taggerTimeZoneOffset = platform.timeZoneOffset(taggerTimeStamp);
        return new RevPersonImpl(taggerName, taggerEmail, taggerTimeStamp, taggerTimeZoneOffset);
    }

}
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

        if (!enabled.booleanValue()) {
            return command;
        }

        final Platform platform = command.context().platform();
        final long startTime = platform.currentTimeMillis();
        final long nanoTime = platform.nanoTime();
        final String name = command.getClass().getSimpleName();
        CallStack stack = CallStack.push(name, startTime, nanoTime);
        command.getClientData().put("metrics.callStack", stack);
        return command;
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

        final Platform platform = platform();
        if (string.equals("yesterday")) { // return the beginning of yesterday, not just 24h ago
                                          // from current time
            try {
                formatter = new SimpleDateFormat("dd/MM/yyyy");
                Date today = new Date(platform.currentTimeMillis());
                long todayOnlyDate = formatter.parse(formatter.format(today)).getTime();
                long millisecsInOneDay = 60 * 60 * 24 * 1000;
                long yesterday = todayOnlyDate - millisecsInOneDay;
                return yesterday;
            } catch (ParseException e) {
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

        }

        if (string.equals("today")) {
            try {
                formatter = new SimpleDateFormat("dd/MM/yyyy");
                Date today = new Date(platform.currentTimeMillis());
                long todayOnlyDate = formatter.parse(formatter.format(today)).getTime();
                return todayOnlyDate;
            } catch (ParseException e) {
                // shouldn't reach this
            }
View Full Code Here

Examples of org.locationtech.geogig.api.Platform.currentTimeMillis()

        // parse it as a git-like time reference
        String[] tokens = string.split("\\.");
        if (tokens.length % 2 != 0) {
            if (tokens[tokens.length - 1].toLowerCase().equals("ago")) {
                long currentTime = platform.currentTimeMillis();
                int i;
                for (i = 0; i < tokens.length - 1; i++) {
                    try {
                        double number = Double.parseDouble(tokens[i]);
                        i++;
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.