Package appeng.me

Examples of appeng.me.GridStorage


    WeakReference<GridStorageSearch> result = loadedStorage.get( gss );

    if ( result == null || result.get() == null )
    {
      String Data = get( "gridstorage", "" + storageID, "" ).getString();
      GridStorage thisStorage = new GridStorage( Data, storageID, gss );
      gss.gridStorage = new WeakReference<GridStorage>( thisStorage );
      loadedStorage.put( gss, new WeakReference<GridStorageSearch>( gss ) );
      return thisStorage;
    }
    return result.get().gridStorage.get();
View Full Code Here


   */
  public GridStorage getNewGridStorage()
  {
    long storageID = nextGridStorage();
    GridStorageSearch gss = new GridStorageSearch( storageID );
    GridStorage newStorage = new GridStorage( storageID, gss );
    gss.gridStorage = new WeakReference<GridStorage>( newStorage );
    loadedStorage.put( gss, new WeakReference<GridStorageSearch>( gss ) );
    return newStorage;
  }
View Full Code Here

  public void save()
  {
    // populate new data
    for (GridStorageSearch gs : loadedStorage.keySet())
    {
      GridStorage thisStorage = gs.gridStorage.get();
      if ( thisStorage != null && thisStorage.getGrid() != null && !thisStorage.getGrid().isEmpty() )
      {
        String value = thisStorage.getValue();
        get( "gridstorage", "" + thisStorage.getID(), value ).set( value );
      }
    }

    // save to files
    if ( hasChanged() )
View Full Code Here

TOP

Related Classes of appeng.me.GridStorage

Copyright © 2018 www.massapicom. 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.