Package net.jini.id

Examples of net.jini.id.Uuid


                  // we hold the lock.
                  // TODO: optimize loop to ignore indices w/o available events
                  // TODO: optimize loop to skip nextInt if only one choice
                  while (count-- > 0) {
                      int index = rand.nextInt(pendingReg.size());
                      Uuid uuid = (Uuid)pendingReg.get(index);
                      ServiceRegistration reg = null;
                  try {
                            // Note: the following method will throw a
                            // ThrowThis exception if the registration is
                            // invalid (i.e. expired or non-existent)
View Full Code Here


         *  - ConstrainableFiddlerRegistration
         *  - ConstrainableFiddlerLease
         *  - ConstrainableFiddlerAdminProxy
         */
        RemoteMethodControl inputProxy;
        Uuid inputProxyID;
        if( obj instanceof FiddlerProxy.ConstrainableFiddlerProxy ) {
            inputProxy = (RemoteMethodControl)((FiddlerProxy)obj).server;
            inputProxyID = ((ReferentUuid)obj).getReferentUuid();
        } else if
          (obj instanceof FiddlerRegistration.ConstrainableFiddlerRegistration)
View Full Code Here

  return createServiceID();
    }

    /** Creates a new service ID. */
    protected static ServiceID createServiceID() {
  Uuid uuid = UuidFactory.generate();
  return new ServiceID(
      uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
    }
View Full Code Here

  }
    }

    /** Generate a new service ID */
    private ServiceID newServiceID() {
  Uuid uuid = serviceIdGenerator.generate();
  return new ServiceID(
      uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
    }
View Full Code Here

  }
  if (obj == null || ctx == null) {
      throw new NullPointerException("Arguments must not be null");
  }
  RemoteMethodControl otherServerProxy;
  Uuid inputProxyID = null;
  if (obj instanceof Registration.ConstrainableRegistration) {
      Registration reg = (Registration) obj;
      // verify sub-components
      if (!isTrustedObject(reg.lease, ctx) ||
    !isTrustedObject(reg.listener, ctx)) {
View Full Code Here

  tmpl = setupTmpl(tmpl);

        ServerTransaction str = serverTransaction(tr);
  Txn txn = enterTxn(tr);

  final Uuid cookie = UuidFactory.generate();
  final long eventID = nextID();
  final long now = System.currentTimeMillis();

  final EventRegistrationWatcher reg;
  if (txn == null) {
View Full Code Here

  for (int i=0; i<tmpls.length; i++) {
      tmpls[i] = setupTmpl(tmpls[i]);
  }

  final Uuid cookie = UuidFactory.generate();
  final long eventID = nextID();
  final long now = System.currentTimeMillis();

  final AvailabilityRegistrationWatcher reg;
  if (txn == null) {
View Full Code Here

    if (txn.getState() != ACTIVE)
        throw throwNewCannotJoinException();
      }
  }

  final Uuid uuid = UuidFactory.generate();
  final ContentsQuery contentsQuery = new ContentsQuery(uuid, tmpls,
                    txn, limit);
  final EntryRep[] reps = contentsQuery.nextBatch(null,
         System.currentTimeMillis());
View Full Code Here

    if (txn.getState() != ACTIVE)
        throw throwNewCannotJoinException();
      }
  }

  final Uuid uuid = UuidFactory.generate();
  iterations.put(uuid, new IteratorImpl(tmpl, txn));
  return uuid;
    }
View Full Code Here

    public void run() throws Exception {
        FakeEndpoint ep1 = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        FakeEndpoint ep2 = new FakeEndpoint(new FakeOutboundRequestIterator(
            new FakeOutboundRequest(),false));
        Uuid uuid1 = UuidFactory.create(1,2);
        Uuid uuid2 = UuidFactory.create(2,1);

        logger.log(Level.FINE,"=================================");
        logger.log(Level.FINE,"test case 1: "
            + "normal equals, hashCode, toString method calls");
        logger.log(Level.FINE,"");
View Full Code Here

TOP

Related Classes of net.jini.id.Uuid

Copyright © 2018 www.massapicom. 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.