Package com.sun.sgs.app

Examples of com.sun.sgs.app.DataManager.createReference()


            tailElement.get().set(ref);
            return;
        }

        Element<E> oldHead = headElement();
        headElement.get().set(dm.createReference(e));
        e.setPrev(null);
        e.setNext(oldHead);
        oldHead.setPrev(e);
    }
View Full Code Here


        DataManager dm = AppContext.getDataManager();

        // short-circuit case if this element is the only element in
        // the deque (i.e. the deque was empty)
        if (tailElement.get().get() == null) {
            ManagedReference<Element<E>> ref = dm.createReference(e);
            headElement.get().set(ref);
            tailElement.get().set(ref);
            return;
        }
View Full Code Here

            tailElement.get().set(ref);
            return;
        }

        Element<E> oldTail = tailElement();
        tailElement.get().set(dm.createReference(e));
        e.setPrev(oldTail);
        e.setNext(null);
        oldTail.setNext(e);
    }
View Full Code Here

        if (o == null || !(o instanceof ScalableDeque)) {
            return false;
        }
        ScalableDeque<E> d = uncheckedCast(o);
        DataManager dm = AppContext.getDataManager();
        return dm.createReference(this).equals(dm.createReference(d));
    }

    /**
     * Returns the next unique identifier for an {@code Element} that
     * is being added to the head of the deque.
View Full Code Here

        if (o == null || !(o instanceof ScalableDeque)) {
            return false;
        }
        ScalableDeque<E> d = uncheckedCast(o);
        DataManager dm = AppContext.getDataManager();
        return dm.createReference(this).equals(dm.createReference(d));
    }

    /**
     * Returns the next unique identifier for an {@code Element} that
     * is being added to the head of the deque.
View Full Code Here

        // next element references will only be null if an element is
        // at an end of the list.
        DataManager dm = AppContext.getDataManager();
        if (e.prevElement == null) {
            headElement.get().set((next == null)
                                  ? null : dm.createReference(next));
        }
        if (e.nextElement == null) {
            tailElement.get().set((prev == null)
                                  ? null : dm.createReference(prev));
        }
View Full Code Here

            headElement.get().set((next == null)
                                  ? null : dm.createReference(next));
        }
        if (e.nextElement == null) {
            tailElement.get().set((prev == null)
                                  ? null : dm.createReference(prev));
        }
        AppContext.getDataManager().removeObject(e);

        return value;
    }
View Full Code Here

        Channel cellChannel = cm.createChannel("Cell "+cell.getCellID().toString(),
                                               null,
                                               Delivery.RELIABLE);

        DataManager dm = AppContext.getDataManager();
        cellChannelRef = dm.createReference(cellChannel);

        // cache the sender for sending to cell clients.  This saves a
        // Darkstar lookup for every cell we want to send to.
        cellSender = WonderlandContext.getCommsManager().getSender(CellChannelConnectionType.CLIENT_TYPE);
    }
View Full Code Here

      ListNode<E> n = new ListNode<E>(this, bucketSize, e);
      size = n.size();
      childrenCount = 1;
      DataManager dm = AppContext.getDataManager();
      childRef = dm.createReference((Node<E>) n);
      parentRef = createReferenceIfNecessary(parent);
  }

  /**
   * Constructor which creates a {@code TreeNode} while specifying
View Full Code Here

      if (!isSplit) {
    ListNode<E> n = new ListNode<E>(this, bucketSize);
    DataManager dm = AppContext.getDataManager();
    size = n.size();
    childRef = dm.createReference((Node<E>) n);
      } else {
    size = 0;
    childRef = null;
      }
      parentRef = createReferenceIfNecessary(parent);
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.