Package net.jini.id

Examples of net.jini.id.Uuid


      URLClassLoader.newInstance(
    new URL[] { codebase },
    DgcServerExposure.class.getClassLoader());
  Class foreignUuidClass = Class.forName(foreignUuidClassName, false,
                 foreignUuidLoader);
  Uuid foreignUuid = (Uuid) foreignUuidClass.newInstance();

  /*
   * Establish two server endpoints and proxies for calling the
   * DGC servers at each of those endpoints.
   */
 
View Full Code Here


  try {
      exp.export(new Tester(exp, null));
      throw new RuntimeException("server auth req did not cause EE");
  } catch (ExportException e) {
  }
  final Uuid oid = UuidFactory.generate();
  exp = new BasicJeriExporter(se, uilf, false, false, oid);
  compare(exp, se, uilf, false, false, oid);
  compare(new BasicJeriExporter(se, uilf, false, true, oid),
    se, uilf, false, true, oid);
  compare(new BasicJeriExporter(se, uilf, true, false, oid),
View Full Code Here

    Target get(Uuid id) {
            return idTable.get(id);
    }

    void put(Target target) throws ExportException {
        Uuid id = target.getObjectIdentifier();
        if (id.equals(Jeri.DGC_ID)) {
            throw new ExportException(
                "object identifier reserved for DGC");
        }
        Target exists = idTable.putIfAbsent(id, target);
        if (exists != null){
View Full Code Here

            dgcEnabledCount.incrementAndGet();
        }
    }

    void remove(Target target, boolean gc) {
            Uuid id = target.getObjectIdentifier();
            boolean removed = idTable.remove(id, target);
            if (target.getEnableDGC() && removed) {
                int count = dgcEnabledCount.decrementAndGet();
                assert count >= 0;
            }
View Full Code Here

    }

    public void dispatch(InboundRequest request) {
        try {
            InputStream in = request.getRequestInputStream();
            Uuid id = UuidFactory.read(in);
            Target target = null;
            if (logger.isLoggable(Level.FINEST)) {
                logger.log(Level.FINEST, "id={0}", id);
            }

            try {
                /*
                 * The DGC object identifier is hardwired here,
                 * rather than install it in idTable; this
                 * eliminates the need to worry about not counting
                 * the DGC server as an exported object in the
                 * table, and it doesn't need all of the machinery
                 * that Target provides.
                 */
                if (id.equals(Jeri.DGC_ID)) {
                    dispatchDgcRequest(request);
                    return;
                }

                target = get(id);
View Full Code Here

    private byte[]  cookie;
    private long  expiration;

    Resource(StorableResource resource) {
  super(resource);
  final Uuid uuid = resource.getCookie();
  cookie = ByteArrayWrapper.toByteArray(uuid);
  expiration = resource.getExpiration();
    }
View Full Code Here

  leaseToRenew = (Lease) leasePreparer.prepareProxy(leaseToRenew);

  // Ensure that the lease is not a current lease granted by this server
  if (leaseToRenew instanceof ReferentUuid) {
      Uuid cookie = ((ReferentUuid) leaseToRenew).getReferentUuid();
      LeaseSet setForLease = (LeaseSet) setTable.get(cookie);
      if (setForLease != null) {
    synchronized (setForLease) {
        if (isCurrent(setForLease)) {
      throw new IllegalArgumentException(
View Full Code Here

    // Methods defined in LeaseRenewalService

    // Inherit java doc from super type
    public LeaseRenewalSet createLeaseRenewalSet(long leaseDuration) {
  ready.check();
  final Uuid newID      = UuidFactory.generate();
  final LeaseSet newSet = new LeaseSet(newID, generator, store, this);
 
  LeasePeriodPolicy.Result leasePeriod;
  try {
      leasePeriod = setLeasePolicy.grant(newSet, leaseDuration);
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 TxnMgrProxy.ConstrainableTxnMgrProxy) {
      otherServerProxy = (RemoteMethodControl)
    ((TxnMgrProxy)obj).backend;
      inputProxyID = ((ReferentUuid)obj).getReferentUuid();
  } else if (obj instanceof ConstrainableLandlordLease) {
View Full Code Here

    }

    public void run() {
  while (!dead) { // ok not to lock since it starts false
      try {
    final Uuid cookie;
    synchronized (this) {
        while (!dead && queue.isEmpty()) {
      wait();
        }
       
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.