Package net.jini.id

Examples of net.jini.id.Uuid


                recoveryLogger.log(Level.FINEST, "Rebuilding transient state ...");
            }
      Collection regs = regByID.values();
      Iterator iter = regs.iterator();
      ServiceRegistration reg = null;
      Uuid uuid = null;
            EventLogIterator eli = null;
      while (iter.hasNext()) {
          reg = (ServiceRegistration)iter.next(); // get Reg
          uuid = (Uuid)reg.getCookie();           // get its Uuid
          if (recoveryLogger.isLoggable(Level.FINEST)) {
View Full Code Here


  }
        if (duration < 1 && duration != Lease.ANY)
      throw new IllegalArgumentException(
          "Duration must be a positive value");
        // Create new ServiceRegistration object
        Uuid uuid = UuidFactory.generate();
        EventLogIterator iter = persistent?
      eventLogFactory.iterator(uuid,
          getEventLogPath(persistenceDirectory, uuid)):
      eventLogFactory.iterator(uuid);
        ServiceRegistration reg = new ServiceRegistration(uuid, iter);
View Full Code Here

      operationsLogger.entering(mailboxSourceClass,
          "enableDeliveryDo", new Object[] {uuid, preparedTarget});
  }
  // Check for the resubmission of one of our own listeners
  if (preparedTarget instanceof ListenerProxy) {
      Uuid id = ((ListenerProxy)preparedTarget).getReferentUuid();
      if (regByID.get(id) != null) {
          if(deliveryLogger.isLoggable(Level.FINEST)) {
                    deliveryLogger.log(Level.FINEST,
                  "Disallowing resubmission of one of"
            " this service''s own listeners: {0}", id);
View Full Code Here

        // Note: the following method will throw a ThrowThis exception
        // if the registration is invalid (i.e. expired or non-existent)
        ServiceRegistration reg = getServiceRegistration(uuid);
       
        Uuid iteratorId = UuidFactory.generate();
        if(deliveryLogger.isLoggable(Level.FINEST)) {
            deliveryLogger.log(Level.FINEST,
                "Generated remote event iterator id {0}", iteratorId);
        }      
  // Log this event
View Full Code Here

        throws InvalidIteratorException, ThrowThis
    {
        // Note: the following method will throw a ThrowThis exception
        // if the registration is invalid (i.e. expired or non-existent)
        ServiceRegistration reg = getServiceRegistration(regId);
        Uuid validIterId = reg.getRemoteEventIteratorID();
        if (!iterId.equals(validIterId)) {
      if(deliveryLogger.isLoggable(Level.FINEST)) {
                deliveryLogger.log(Level.FINEST,
              "Provided iterator id " + iterId +
                    " doesn't match current valid iterator id " +
View Full Code Here

                  // 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

  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

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.