Package com.sun.sgs.app

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


                                               NotificationType.LOGOUT));
        }

        // now that we have collected all logout tasks, start running them
        AppContext.getTaskManager().scheduleTask(
                new LogoutTask(clientID, dm.createReference(tasks)));
    }

    /**
     * Cleanup when all logouts for a given id are finished
     * @param id the id to cleanup
View Full Code Here


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

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

View Full Code Here

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

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

View Full Code Here

    public String getIDFor(ProximityListenerSrv listener) {
        // issue #1101: if the listener is a managed object, generate
        // and ID based on the ID of the underlying managed object.
        if (listener instanceof ManagedObject) {
            DataManager dm = AppContext.getDataManager();
            return cellID + "." + dm.createReference(listener).getId();
        } else {
            // the object is not a managed object, so return a newly assigned
            // id
            return cellID + "." + nextID++;
        }
View Full Code Here

     */
    public ScalableDeque() {
        backingMap = new ScalableHashMap<Element<E>, Long>();

        DataManager dm = AppContext.getDataManager();
        backingMapRef = dm.createReference(backingMap);

        // initialize the pointers to the front and end of the deque
        // to null.  However, the reference to these pointers will
        // always be non-null
        ManagedSerializable<ManagedReference<Element<E>>> head =
View Full Code Here

        ManagedSerializable<ManagedReference<Element<E>>> tail =
                new ManagedSerializable<ManagedReference<Element<E>>>(null);
        ManagedSerializable<Long> tailCount =
                new ManagedSerializable<Long>(0L);

        headElement = dm.createReference(head);
        headCounter = dm.createReference(headCount);
        tailElement = dm.createReference(tail);
        tailCounter = dm.createReference(tailCount);
    }
View Full Code Here

                new ManagedSerializable<ManagedReference<Element<E>>>(null);
        ManagedSerializable<Long> tailCount =
                new ManagedSerializable<Long>(0L);

        headElement = dm.createReference(head);
        headCounter = dm.createReference(headCount);
        tailElement = dm.createReference(tail);
        tailCounter = dm.createReference(tailCount);
    }

    /**
 
View Full Code Here

        ManagedSerializable<Long> tailCount =
                new ManagedSerializable<Long>(0L);

        headElement = dm.createReference(head);
        headCounter = dm.createReference(headCount);
        tailElement = dm.createReference(tail);
        tailCounter = dm.createReference(tailCount);
    }

    /**
     * Creates a {@code ScalableDeque} and adds all the elements in the
View Full Code Here

                new ManagedSerializable<Long>(0L);

        headElement = dm.createReference(head);
        headCounter = dm.createReference(headCount);
        tailElement = dm.createReference(tail);
        tailCounter = dm.createReference(tailCount);
    }

    /**
     * Creates a {@code ScalableDeque} and adds all the elements in the
     * provided collection according to their traversal ordering.
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 (headElement.get().get() == null) {
            ManagedReference<Element<E>> ref = dm.createReference(e);
            headElement.get().set(ref);
            tailElement.get().set(ref);
            return;
        }
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.