org.jdesktop.wonderland.server.cell
Class CellPersistence

java.lang.Object
  extended by org.jdesktop.wonderland.server.cell.CellPersistence

public class CellPersistence
extends java.lang.Object

A class that manages the long-term persistence of Wonderland cells using cell importers and cell exporters to read from WFS.

This internal API is used from the Universe service to reload cells during a warm start, or write them out during a cold start.

Author:
jkaplan

Constructor Summary
CellPersistence()
          singleton.
 
Method Summary
 java.util.Set<CellID> getRootCellIDs()
          Get the set of all CellIds to reload.
 boolean reloadCell(CellID cellID, UniverseManager universe)
          Reload a root cell into the given universe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellPersistence

public CellPersistence()
singleton. Use getInstance() instead

Method Detail

getRootCellIDs

public java.util.Set<CellID> getRootCellIDs()
Get the set of all CellIds to reload. The returned set guarantees that the iterator over the set is Serializable, so the reloading can be split across multiple transactions safely. It is assumed that the set of cells will not change during the course of iterating over the CellIDs.

Returns:
the set of cell IDs, as a ScalableHashSet or similar set with a serializable, transaction safe iterator

reloadCell

public boolean reloadCell(CellID cellID,
                          UniverseManager universe)
Reload a root cell into the given universe

Parameters:
cellID - the cellID of the root cell to load
universe - the universe to load the cell into
dataService - the data service to use when loading the cell
Returns:
true if the cell was found and reloaded, or false if not


Open Wonderland - http://openwonderland.org