Examples of checkExists()


Examples of org.apache.curator.framework.CuratorFramework.checkExists()

            Assert.assertNotNull(client.checkExists().forPath("/head"));

            CountDownLatch      latch = new CountDownLatch(1);
            client.delete().inBackground(latch).forPath("/head");
            Assert.assertTrue(latch.await(10, TimeUnit.SECONDS));
            Assert.assertNull(client.checkExists().forPath("/head"));
        }
        finally
        {
            client.close();
        }
View Full Code Here

Examples of org.quartz.Scheduler.checkExists()

            jobDataMap.put(SchedulerServiceConstants.TENANT_IDENTIFIER, ThreadLocalContextUtil.getTenant().getTenantIdentifier());
            final String key = scheduledJobDetail.getJobKey();
            final JobKey jobKey = constructJobKey(key);
            final String schedulerName = getSchedulerName(scheduledJobDetail);
            final Scheduler scheduler = this.schedulers.get(schedulerName);
            if (scheduler == null || !scheduler.checkExists(jobKey)) {
                final JobDetail jobDetail = createJobDetail(scheduledJobDetail);
                final String tempSchedulerName = "temp" + scheduledJobDetail.getId();
                final Scheduler tempScheduler = createScheduler(tempSchedulerName, 1, schedulerJobListener, schedulerStopListener);
                tempScheduler.addJob(jobDetail, true);
                jobDataMap.put(SchedulerServiceConstants.SCHEDULER_NAME, tempSchedulerName);
View Full Code Here

Examples of org.tmatesoft.hg.core.HgChangesetFileSneaker.checkExists()

    fs2.changeset(cset);
//    hgRepo.getManifest().getFileRevision(TIP, fname);
    final long start1 = System.nanoTime();
    boolean e1 = fs1.checkExists(fname);
    final long end1 = System.nanoTime();
    boolean e2 = fs2.checkExists(fname);
    final long end2 = System.nanoTime();
    Nodeid fr = hgRepo.getManifest().getFileRevision(TIP, fname);
    final long end3 = System.nanoTime();
    System.out.printf("\t1st run: %d ms, %b\n\t2nd run: %d ms, %b\n\tfile only: %d ms", (end1 - start1) / 1000000, e1, (end2 - end1) / 1000000, e2, (end3-end2)/1000000);
    if (!fr.equals(fs1.revision()) || !fr.equals(fs2.revision())) {
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.