Examples of createReference()


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

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

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

            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

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

        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

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

      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

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

      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

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

   * @param root the root node of the entire tree structure
   */
  AsynchronousClearTask(ScalableList<E> list) {
      assert (list != null);
      DataManager dm = AppContext.getDataManager();
      current = dm.createReference(list.getHead());
  }

  /**
   * The entry point of the task to perform the clear.
   */
 
View Full Code Here

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

        private TestProtocolSessionListener(ClientSession session) {
            logger.info("New session for " + session.getName());
           
            DataManager dm = AppContext.getDataManager();
            sessionRef = dm.createReference(session);
        }
           
        public void receivedMessage(ByteBuffer data) {
            logger.info("Received " + data.remaining() + " bytes from " +
                        getSession().getName() + ".");
View Full Code Here

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

                            ClientSession session)
            {
                this.sender = sender;
               
                DataManager dm = AppContext.getDataManager();
                sessionRef = dm.createReference(session);
            }

            public void run() throws Exception {
                sender.send(new TestMessageOne("Task: TestOne"));
                sender.send(sessionRef.get(), new TestMessageThree("Task: TestThree (private)", 42));
View Full Code Here

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

  int numLeaves = 1 << leafBits;

  DataManager dm = AppContext.getDataManager();
  dm.markForUpdate(this);
        ManagedReference<ScalableHashMap<K, V>> thisRef =
      dm.createReference(this);

  ScalableHashMap[] leaves = new ScalableHashMap[numLeaves];
  for (int i = 0; i < numLeaves; ++i) {
            ScalableHashMap<K, V> leaf = new ScalableHashMap<K, V>(
    depth + leafBits, minDepth, splitThreshold, 1 << maxDirBits);
View Full Code Here

Examples of com.sun.sgs.service.DataService.createReference()

      if (!(listener instanceof Serializable)) {
    throw new IllegalArgumentException("non-serializable listener");
      } else if (!(listener instanceof ManagedObject)) {
    listener = new ManagedSerializableChannelListener(listener);
      }
      this.listenerRef = dataService.createReference(listener);
  } else {
      this.listenerRef = null;
  }
  this.delivery = delivery;
  this.writeBufferCapacity = writeBufferCapacity;
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.