Examples of IdGenerator


Examples of com.github.tomakehurst.wiremock.common.IdGenerator

        listener.requestReceived(request,
                response().status(200).body("anything").fromProxy(true).build());
    }
   
  private IdGenerator fixedIdGenerator(final String id) {
      return new IdGenerator() {
            public String generate() {
                return id;
            }
        };
  }
View Full Code Here

Examples of com.goodow.realtime.channel.util.IdGenerator

  private void beginCreationCompoundOperation() {
    beginCompoundOperation("initialize");
  }

  private String generateObjectId() {
    return "gde" + new IdGenerator().next(14);
  }
View Full Code Here

Examples of com.google.template.soy.base.IdGenerator

    // This pass simply finds all the CssNodes.
    visitChildren(node);

    // Perform the replacments.
    IdGenerator nodeIdGen = node.getNearestAncestor(SoyFileSetNode.class).getNodeIdGenerator();
    for (CssNode cssNode : cssNodes) {

      StandaloneNode newNode;

      if (cssHandlingScheme == CssHandlingScheme.LITERAL) {
        newNode = new RawTextNode(nodeIdGen.genId(), cssNode.getCommandText());

      } else if (cssHandlingScheme == CssHandlingScheme.REFERENCE) {
        PrintNode newPrintNode =
            new PrintNode(nodeIdGen.genId(), false, cssNode.getCommandText(), null);
        newPrintNode.addChild(new PrintDirectiveNode(nodeIdGen.genId(), "|noAutoescape", ""));
        newNode = newPrintNode;
        // Check that the expression is a valid reference.
        boolean isInvalidExpr = false;
        if (newPrintNode.getExprUnion().getExpr() == null) {
          isInvalidExpr = true;
View Full Code Here

Examples of com.hazelcast.core.IdGenerator

        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
        ServiceReference reference = context.getServiceReference("com.hazelcast.core.HazelcastInstance");
        HazelcastInstance instance = (HazelcastInstance) context.getService(reference);
        context.ungetService(reference);
        try {
            IdGenerator idGenerator = instance.getIdGenerator("cellar-smaple-generator");
            Long id = idGenerator.newId();
            topic = instance.getTopic("cellar-sample-topic");
            topic.addMessageListener(messageListener);
            topic.publish(new Message("id="+id));
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

Examples of com.impetus.kundera.persistence.IdGenerator

    public ObjectGraphBuilder(PersistenceCache pcCache, PersistenceDelegator pd)
    {
        this.persistenceCache = pcCache;
        this.pd = pd;
        this.idGenerator = new IdGenerator();
        this.validator = new PersistenceValidator();
    }
View Full Code Here

Examples of com.sun.sgs.impl.util.IdGenerator

  idBlockSize = wrappedProps.getIntProperty(
       ID_BLOCK_SIZE_PROPERTY, DEFAULT_ID_BLOCK_SIZE,
      IdGenerator.MIN_BLOCK_SIZE, Integer.MAX_VALUE);
 
  idGenerator =
      new IdGenerator(ID_GENERATOR_NAME,
          idBlockSize,
          txnProxy,
          transactionScheduler);

  FailedNodesRunnable failedNodesRunnable = new FailedNodesRunnable();
View Full Code Here

Examples of com.taobao.metamorphosis.utils.IdGenerator

    }


    @Before
    public void setUp() {
        this.idGenerator = new IdGenerator();
        this.remotingClient = EasyMock.createMock(RemotingClient.class);
        this.sessionId = this.idGenerator.generateId();
        this.session = new MockSession(this.sessionId);
        this.context =
                new TransactionContext(this.remotingClient, null, this.session, new LongSequenceGenerator(), 0,
View Full Code Here

Examples of li.earth.urchin.twic.persistence.id.IDGenerator

public abstract class IDGeneratorTests {
 
  @Test
  public void startsSomewhereOtherThanZero() throws Exception {
    IDGenerator generator = newIDGenerator();
    int id = generator.generateID(String.class);
    assertTrue(id != 0);
  }
View Full Code Here

Examples of net.java.textilej.parser.IdGenerator

    root.clear();
    if (textile == null || textile.length() == 0) {
      return root;
    }
 
    IdGenerator idGenerator = new IdGenerator();
   
    OutlineItem current = root;
   
    Matcher matcher = ITEM_PATTERN.matcher(textile);
    while (matcher.find()) {
      int offset = matcher.start();
      int length = matcher.end()-offset;
      String kind = matcher.group(1);
      String levelString = matcher.group(2);
      String label = matcher.group(3);
      String tooltip = label;
      String fullLabelText = label;
      if (label == null) {
        label = "";
      } else {
        if (labelMaxLength > 0 && label.length() > labelMaxLength) {
          label = label.substring(0,labelMaxLength)+"...";
        }
      }
      int level = Integer.parseInt(levelString);
      if (level <= 0) {
        level = 1;
      }
      while (level <= current.getLevel()) {
        current = current.getParent();
      }
      current = createOutlineItem(current,idGenerator.newId(kind,fullLabelText), offset, length, label);
      current.setTooltip(tooltip);
      current.setKind(kind);
    }
   
    return root;
View Full Code Here

Examples of org.activemq.util.IdGenerator

     */
    protected PeerTransportChannel(WireFormat wireFormat, String serviceName) throws JMSException {
        this.wireFormat = wireFormat;
        this.serviceName = serviceName;
        this.discoveryURI = MulticastDiscoveryAgent.DEFAULT_DISCOVERY_URI;
        IdGenerator idGen = new IdGenerator();
        this.brokerName = idGen.generateId();
        this.brokerConnectorURI = DEFAULT_BROKER_CONNECTOR_URI;
        this.doDiscovery = true;
        if (serviceName == null || serviceName.length() == 0) {
            throw new IllegalStateException("No service name specified for peer:// protocol");
        }
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.