Package net.jini.id

Examples of net.jini.id.Uuid


        readyState.check();
   
  TxnManagerTransaction txntr = null;

  long tid = nextID();
        Uuid uuid = createLeaseUuid(tid);

        if (transactionsLogger.isLoggable(Level.FINEST)) {
            transactionsLogger.log(Level.FINEST,
          "Transaction ID is: {0}", new Long(tid));
  }
View Full Code Here


  }
  TxnManagerTransaction tmt =
          (TxnManagerTransaction) txns.get(key);

  if (tmt == null) {
            Uuid uuid = createLeaseUuid(cookie);
      tmt = new TxnManagerTransaction(
          txnMgrProxy, logmgr, cookie, taskpool,
    taskWakeupMgr, this, uuid);
      noteUnsettledTxn(cookie);
      /* Since only aborted or committed txns are persisted,
View Full Code Here

    {
        /* Input okay. Create the registration and associated information */
  long curTime    = System.currentTimeMillis();
        leaseDuration   = applyBoundToLeaseDuration(leaseDuration,
                                                    leaseBound);
        Uuid regID      = UuidFactory.generate();
        Uuid leaseID    = regID;//use same ID since Reg "wraps" the lease
        long expiration = curTime + leaseDuration;

        /* Prepare the new listener */
        listener = (RemoteEventListener)listenerPreparer.prepareProxy
                                                                   (listener);
View Full Code Here

                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

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.