Package com.sun.sgs.app

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


            this.sender = sender;
            this.count = count;
           
            // create managed references
            DataManager dm = AppContext.getDataManager();
            opsRef = dm.createReference(new OpsList());
        }
       
        public void startRevalidate() {   
        }
       
View Full Code Here


        // must save a ManagedReference to the item.

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

        return items.add(dataManager.createReference(item));
    }

    /**
     * Adds a player to this room.
     *
 
View Full Code Here

            new Object[] { player, this });

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

        return players.add(dataManager.createReference(player));
    }

    /**
     * Removes a player from this room.
     *
 
View Full Code Here

            new Object[] { player, this });

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

        return players.remove(dataManager.createReference(player));
    }

    /**
     * Returns a description of what the given player sees in this room.
     *
 
View Full Code Here

     */
    protected void setSession(ClientSession session) {
        DataManager dataMgr = AppContext.getDataManager();
        dataMgr.markForUpdate(this);

        currentSessionRef = dataMgr.createReference(session);

        logger.log(Level.INFO,
            "Set session for {0} to {1}",
            new Object[] { this, session });
    }
View Full Code Here

        if (room == null) {
            currentRoomRef = null;
            return;
        }

        currentRoomRef = dataManager.createReference(room);
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
View Full Code Here

        if (room == null) {
            roomRef = null;
            return;
        }

        roomRef = dataManager.createReference(room);
    }

    /**
     * {@inheritDoc}
     * <p>
 
View Full Code Here

     * view.
     * @param view the view associated with this cache
     */
    public ViewCellCacheMO(ViewCellMO view) {
        DataManager dm = AppContext.getDataManager();
        viewRef = dm.createReference(view);
    }

    /**
     * Gets the ViewCellMO associated with this ViewCellCacheMO.
     */
 
View Full Code Here

        if (session == null) {
            throw new NullPointerException("null session");
        }

        DataManager dataMgr = AppContext.getDataManager();
        sessionRef = dataMgr.createReference(session);
        sessionName = session.getName();
       
        // Join the session to all channels.  We obtain the channel
        // in two different ways, by reference and by name.
        ChannelManager channelMgr = AppContext.getChannelManager();
View Full Code Here

        if (subTask == null) {
            subTaskRef = null;
            return;
        }
        DataManager dataManager = AppContext.getDataManager();
        subTaskRef = dataManager.createReference(subTask);
    }

    // implement AppListener

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