C# Class Universe.Modules.FileBasedSimulationData

FileBased DataStore, do not store anything in any databases, instead save .sim files for it
Inheritance: ISimulationDataStore, IDisposable
Exibir arquivo Open project: Virtual-Universe/Virtual-Universe

Protected Properties

Property Type Description
_oldRegionLoader IRegionDataLoader
_regionData RegionData
_regionLoader IRegionDataLoader
m_backupSaveTimer System.Timers.Timer
m_displayNotSavingNotice bool
m_fileName string
m_keepOldSave bool
m_mapcenter_x int
m_mapcenter_y int
m_oldSaveDirectory string
m_oldSaveHasBeenSaved bool
m_regionNameSeed string[]
m_removeArchiveDays int
m_requiresSave bool
m_saveBackupChanges bool
m_saveBackups bool
m_saveChanges bool
m_saveLock object
m_saveTimer System.Timers.Timer
m_scene IScene
m_shutdown bool
m_storeDirectory string
m_timeBetweenBackupSaves int
m_timeBetweenSaves int

Public Methods

Method Description
CacheDispose ( ) : void
CleanupRegionBackups ( IScene scene, string cmds ) : void

Cleanups the old region backups.

Copy ( ) : ISimulationDataStore
CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : RegionInfo
CreateNewRegion ( ISimulationBase simBase, RegionInfo regionInfo, int>.Dictionary currentInfo ) : RegionInfo

Initializes a new region using the passed regioninfo

CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : RegionInfo
DeleteUpOldArchives ( int daysOld ) : void
Dispose ( ) : void
FileBasedSimulationData ( ) : System
FindBackupRegionFiles ( ) : List
FindRegionBackupFiles ( string regionName ) : List
FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
ForceBackup ( ) : void
GetLastBackupFileName ( string regionName ) : string
Initialize ( ) : void
LoadLandObjects ( ) : List

Around for legacy things

LoadObjects ( ) : List
LoadRegionInfo ( string fileName, ISimulationBase simBase ) : RegionInfo
LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : RegionInfo
LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RemoveRegion ( ) : void
RestoreBackupFile ( string fileName, string regionName ) : bool
RestoreLastBackup ( string regionName ) : bool

Restores the last backup.

SetRegion ( IScene scene ) : void
Shutdown ( ) : void
Tainted ( ) : void
UpdateRegionInfo ( IScene scene, string cmds ) : void

Updates the region info, allowing for changes etc.

UpdateRegionPrims ( IScene scene, string cmds ) : void

Sets the region prim capacity.

Protected Methods

Method Description
ReadBackup ( string fileName ) : void
ReadConfig ( ISimulationBase simBase ) : void

Read the config for the data loader

SaveBackup ( bool isOldSave ) : void

Save a backup of the sim

SerializeDateTime ( ) : string
m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup into the oldSaveDirectory on the timer event

m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Save a backup on the timer event

Private Methods

Method Description
BuildOldSaveFileName ( ) : string
BuildSaveFileName ( ) : string
BuildSaveFileName ( string name ) : string
CreateRegionFromConsole ( RegionInfo info, bool prompt, int>.Dictionary currentInfo ) : RegionInfo

Creates/updates a region from console.

GetRegionLocation ( RegionInfo &regInfo ) : bool

Gets the region location.

GetRegionName ( RegionInfo &regInfo ) : bool

Gets the name of the region.

GetRegionOptional ( RegionInfo &regInfo ) : bool

Gets the region optional settings.

GetRegionSize ( RegionInfo &regInfo ) : bool

Gets the size of the region.

ModifyRegionSettings ( RegionInfo &regInfo, bool advanced ) : bool

Modifies the region settings.

ReadFromData ( byte data ) : ITerrainChannel
UniverseEventManager_OnGenericEvent ( string FunctionName, object parameters ) : object

Look for the backup event, and if it is there, trigger the backup of the sim

WriteTerrainToStream ( ITerrainChannel tModule ) : byte[]

Method Details

CacheDispose() public method

public CacheDispose ( ) : void
return void

CleanupRegionBackups() public method

Cleanups the old region backups.
public CleanupRegionBackups ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
return void

Copy() public method

public Copy ( ) : ISimulationDataStore
return ISimulationDataStore

CreateNewRegion() public method

public CreateNewRegion ( ISimulationBase simBase, int>.Dictionary currentInfo ) : RegionInfo
simBase ISimulationBase
currentInfo int>.Dictionary
return Universe.Framework.SceneInfo.RegionInfo

CreateNewRegion() public method

Initializes a new region using the passed regioninfo
public CreateNewRegion ( ISimulationBase simBase, RegionInfo regionInfo, int>.Dictionary currentInfo ) : RegionInfo
simBase ISimulationBase Sim base.
regionInfo Universe.Framework.SceneInfo.RegionInfo Region info.
currentInfo int>.Dictionary Current region info.
return Universe.Framework.SceneInfo.RegionInfo

CreateNewRegion() public method

public CreateNewRegion ( ISimulationBase simBase, string regionName, int>.Dictionary currentInfo ) : RegionInfo
simBase ISimulationBase
regionName string
currentInfo int>.Dictionary
return Universe.Framework.SceneInfo.RegionInfo

DeleteUpOldArchives() public method

public DeleteUpOldArchives ( int daysOld ) : void
daysOld int
return void

Dispose() public method

public Dispose ( ) : void
return void

FileBasedSimulationData() public method

public FileBasedSimulationData ( ) : System
return System

FindBackupRegionFiles() public method

public FindBackupRegionFiles ( ) : List
return List

FindRegionBackupFiles() public method

public FindRegionBackupFiles ( string regionName ) : List
regionName string
return List

FindRegionInfos() public method

public FindRegionInfos ( bool &newRegion, ISimulationBase simBase ) : List
newRegion bool
simBase ISimulationBase
return List

ForceBackup() public method

public ForceBackup ( ) : void
return void

GetLastBackupFileName() public method

public GetLastBackupFileName ( string regionName ) : string
regionName string
return string

Initialize() public method

public Initialize ( ) : void
return void

LoadLandObjects() public method

Around for legacy things
public LoadLandObjects ( ) : List
return List

LoadObjects() public method

public LoadObjects ( ) : List
return List

LoadRegionInfo() public method

public LoadRegionInfo ( string fileName, ISimulationBase simBase ) : RegionInfo
fileName string
simBase ISimulationBase
return Universe.Framework.SceneInfo.RegionInfo

LoadRegionNameInfo() public method

public LoadRegionNameInfo ( string regionName, ISimulationBase simBase ) : RegionInfo
regionName string
simBase ISimulationBase
return Universe.Framework.SceneInfo.RegionInfo

LoadTerrain() public method

public LoadTerrain ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
return void

LoadWater() public method

public LoadWater ( bool RevertMap, int RegionSizeX, int RegionSizeY ) : void
RevertMap bool
RegionSizeX int
RegionSizeY int
return void

ReadBackup() protected method

protected ReadBackup ( string fileName ) : void
fileName string
return void

ReadConfig() protected method

Read the config for the data loader
protected ReadConfig ( ISimulationBase simBase ) : void
simBase ISimulationBase
return void

RemoveRegion() public method

public RemoveRegion ( ) : void
return void

RestoreBackupFile() public method

public RestoreBackupFile ( string fileName, string regionName ) : bool
fileName string
regionName string
return bool

RestoreLastBackup() public method

Restores the last backup.
public RestoreLastBackup ( string regionName ) : bool
regionName string Region name.
return bool

SaveBackup() protected method

Save a backup of the sim
protected SaveBackup ( bool isOldSave ) : void
isOldSave bool
return void

SerializeDateTime() protected method

protected SerializeDateTime ( ) : string
return string

SetRegion() public method

public SetRegion ( IScene scene ) : void
scene IScene
return void

Shutdown() public method

public Shutdown ( ) : void
return void

Tainted() public method

public Tainted ( ) : void
return void

UpdateRegionInfo() public method

Updates the region info, allowing for changes etc.
public UpdateRegionInfo ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
return void

UpdateRegionPrims() public method

Sets the region prim capacity.
public UpdateRegionPrims ( IScene scene, string cmds ) : void
scene IScene Scene
cmds string Commands
return void

m_backupSaveTimer_Elapsed() protected method

Save a backup into the oldSaveDirectory on the timer event
protected m_backupSaveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
return void

m_saveTimer_Elapsed() protected method

Save a backup on the timer event
protected m_saveTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void
sender object
e System.Timers.ElapsedEventArgs
return void

Property Details

_oldRegionLoader protected_oe property

protected IRegionDataLoader _oldRegionLoader
return IRegionDataLoader

_regionData protected_oe property

protected RegionData,Universe.Modules _regionData
return RegionData

_regionLoader protected_oe property

protected IRegionDataLoader _regionLoader
return IRegionDataLoader

m_backupSaveTimer protected_oe property

protected Timer,System.Timers m_backupSaveTimer
return System.Timers.Timer

m_displayNotSavingNotice protected_oe property

protected bool m_displayNotSavingNotice
return bool

m_fileName protected_oe property

protected string m_fileName
return string

m_keepOldSave protected_oe property

protected bool m_keepOldSave
return bool

m_mapcenter_x protected_oe property

protected int m_mapcenter_x
return int

m_mapcenter_y protected_oe property

protected int m_mapcenter_y
return int

m_oldSaveDirectory protected_oe property

protected string m_oldSaveDirectory
return string

m_oldSaveHasBeenSaved protected_oe property

protected bool m_oldSaveHasBeenSaved
return bool

m_regionNameSeed protected_oe property

protected string[] m_regionNameSeed
return string[]

m_removeArchiveDays protected_oe property

protected int m_removeArchiveDays
return int

m_requiresSave protected_oe property

protected bool m_requiresSave
return bool

m_saveBackupChanges protected_oe property

protected bool m_saveBackupChanges
return bool

m_saveBackups protected_oe property

protected bool m_saveBackups
return bool

m_saveChanges protected_oe property

protected bool m_saveChanges
return bool

m_saveLock protected_oe property

protected object m_saveLock
return object

m_saveTimer protected_oe property

protected Timer,System.Timers m_saveTimer
return System.Timers.Timer

m_scene protected_oe property

protected IScene m_scene
return IScene

m_shutdown protected_oe property

protected bool m_shutdown
return bool

m_storeDirectory protected_oe property

protected string m_storeDirectory
return string

m_timeBetweenBackupSaves protected_oe property

protected int m_timeBetweenBackupSaves
return int

m_timeBetweenSaves protected_oe property

protected int m_timeBetweenSaves
return int