Examples of markForUpdate()


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

     * Log the user in from the specificed session.
     * @param session
     */
    public void login(WonderlandClientID clientID) {
        DataManager dm = AppContext.getDataManager();
        dm.markForUpdate(this);

        // issue 963: session could be null if client is in the process of
        // logging out
        if (clientID.getSession() == null) {
            return;
View Full Code Here

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

        void setNext(Element<E> next) {
            DataManager dm = AppContext.getDataManager();
            ManagedReference<Element<E>> ref =
                    (next == null) ? null : dm.createReference(next);

            dm.markForUpdate(this);
            nextElement = ref;
        }

        /**
         * Sets the link from this {@code Element} to the previous
View Full Code Here

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

        void setPrev(Element<E> prev) {
            DataManager dm = AppContext.getDataManager();
            ManagedReference<Element<E>> ref =
                    (prev == null) ? null : dm.createReference(prev);

            dm.markForUpdate(this);
            prevElement = ref;
        }

        /**
         * {@inheritDoc}
 
View Full Code Here

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

   * The entry point of the task to perform the clear.
   */
  public void run() {
      // Perform some work and check if we need to reschedule
      DataManager dm = AppContext.getDataManager();
      dm.markForUpdate(this);

      if (doWork()) {
    AppContext.getTaskManager().scheduleTask(this);
      } else {
    dm.removeObject(this);
View Full Code Here

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

  // depth on the leaves.
  int leafBits = Math.min(minDepth - depth, maxDirBits);
  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) {
View Full Code Here

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

    private void split() {
  assert isLeafNode() : "Can't split an directory node";
  assert depth < MAX_DEPTH : "Can't split at maximum depth";

  DataManager dataManager = AppContext.getDataManager();
  dataManager.markForUpdate(this);

        ScalableHashMap<K, V> leftChild =
                new ScalableHashMap<K, V>(
                depth + 1, minDepth, splitThreshold, 1 << maxDirBits);
        ScalableHashMap<K, V> rightChild =
View Full Code Here

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

  DataManager dm = AppContext.getDataManager();

  // remove the old leaf node
  dm.removeObject(leaf);
  // mark this node for update since we will be changing its directory
  dm.markForUpdate(this);

  // update the new children nodes to point to this directory node as
  // their parent
        ManagedReference<ScalableHashMap<K, V>> thisRef =
      dm.createReference(this);
View Full Code Here

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

                    ScalableHashMap<K, V> child = ref.get();
        /*
         * Clear the parent reference so we don't walk up to the
         * root node, which is being reused.
         */
        dm.markForUpdate(child);
        child.parentRef = null;
        if (lastRef == null) {
      currentNodeRef = ref;
        } else {
      nodeRefs.add(ref);
View Full Code Here

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

  }

  /** Removes some entries, returning true if there is more to do. */
  private boolean doWork() {
      DataManager dataManager = AppContext.getDataManager();
      dataManager.markForUpdate(this);
            ScalableHashMap<K, V> node = currentNodeRef.get();
      /* Find the leaf node */
      if (!node.isLeafNode()) {
    while (true) {
        currentNodeRef =
View Full Code Here

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

     * @param p the period between recurrences, or
     *          {@code TaskServiceImpl.PERIOD_NONE}
     */
    void resetValues(Task t, long s, long p) {
        DataManager dm = AppContext.getDataManager();
        dm.markForUpdate(this);

        /* If the Task is also a ManagedObject then the assumption is
           that the object was already managed by the application so we
           just keep a reference...otherwise, we make it part of our
           state, which has the effect of persisting the task. In either
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.