Examples of generateID()


Examples of org.apache.activemq.util.IdGenerator.generateId()

        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
        IdGenerator idGen = new IdGenerator();
        // add to a list
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < count; i++) {
            String id = idGen.generateId();
            if (i==0) {
                assertFalse(audit.isDuplicate(id));
                assertTrue(audit.isInOrder(id));
            }
            if (i > 1 && i%2 != 0) {
View Full Code Here

Examples of org.apache.activemq.util.IdGenerator.generateId()

        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
        IdGenerator idGen = new IdGenerator();
        // add to a list
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < count; i++) {
            String id = idGen.generateId();
            list.add(id);
            assertFalse(audit.isDuplicate(id));
        }
        List<String> windowList = list.subList(list.size() -1 -audit.getAuditDepth(), list.size() -1);
        for (String id : windowList) {
View Full Code Here

Examples of org.apache.activemq.util.IdGenerator.generateId()

        ActiveMQMessageAudit audit = new ActiveMQMessageAudit();
        IdGenerator idGen = new IdGenerator();
        // add to a list
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < count; i++) {
            String id = idGen.generateId();
            if (i==0) {
                assertFalse(audit.isDuplicate(id));
                assertTrue(audit.isInOrder(id));
            }
            if (i > 1 && i%2 != 0) {
View Full Code Here

Examples of org.apache.oozie.service.UUIDService.generateId()

    public void testChildId() throws Exception {
        setSystemProperty(UUIDService.CONF_GENERATOR, "counter");
        Services services = new Services();
        services.init();
        UUIDService uuid = services.get(UUIDService.class);
        String id = uuid.generateId(ApplicationType.WORKFLOW);
        String childId = uuid.generateChildId(id, "a");
        assertEquals(id, uuid.getId(childId));
        assertEquals("a", uuid.getChildName(childId));
        services.destroy();
View Full Code Here

Examples of org.apache.oozie.service.UUIDService.generateId()

        setSystemProperty(UUIDService.CONF_GENERATOR, "random");
        services = new Services();
        services.init();
        uuid = services.get(UUIDService.class);
        id = uuid.generateId(ApplicationType.WORKFLOW);
        childId = uuid.generateChildId(id, "a");
        assertEquals(id, uuid.getId(childId));
        assertEquals("a", uuid.getChildName(childId));
        services.destroy();
    }
View Full Code Here

Examples of org.codehaus.activemq.util.IdGenerator.generateId()

                System.out.println("Loading Message Broker from file: " + file);
                factory.setResource(new FileSystemResource(file));
            }

            IdGenerator idgen = new IdGenerator();
            BrokerContainer container = factory.createBrokerContainer(idgen.generateId(), BrokerContext.getInstance());
            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
View Full Code Here

Examples of org.eclipse.egit.github.core.RepositoryId.generateId()

    }else{
      throw new MojoExecutionException("No GitHub repository (owner and name) configured");
    }
    if (isDebug())
      debug(MessageFormat.format("Using GitHub repository {0}",
          repository.generateId()));
    return repository;
  }

  /**
   * Get server with given id
View Full Code Here

Examples of org.eclipse.egit.github.core.RepositoryId.generateId()

      repository = RepositoryId.create(owner, name);
    }else{
      throw new GitHubException("No GitHub repository (owner and name) configured");
    }
    if (log.isDebugEnabled()){
      log.debug(MessageFormat.format("Using GitHub repository {0}", repository.generateId()));
    }
    return repository;
  }
 
  private String[] getPaths(File outputDirectory){
View Full Code Here

Examples of org.hornetq.core.persistence.impl.journal.BatchingIDGenerator.generateID()

      journal.start();

      journal.load(new ArrayList<RecordInfo>(), new ArrayList<PreparedTransactionInfo>(), null);

      BatchingIDGenerator batch = new BatchingIDGenerator(0, 1000, journal);
      long id1 = batch.generateID();
      long id2 = batch.generateID();

      Assert.assertTrue(id2 > id1);

      journal.stop();
View Full Code Here

Examples of org.hornetq.utils.SimpleIDGenerator.generateID()

      journal.setAutoReclaim(false);

      startJournal();
      load();

      long consumerTX = idGen.generateID();

      long firstID = idGen.generateID();

      long appendTX = idGen.generateID();
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.