C# Class OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache

Inheritance: IImprovedAssetCache, ISharedRegionModule
Show file Open project: openmetaversefoundation/fortis-opensim

Public Properties

Property Type Description
DefaultExpirationTime System.TimeSpan

Public Methods

Method Description
AddRegion ( Scene scene ) : void

New region is being added to server.

Cache ( OpenSim.Framework.AssetBase asset ) : void

Cache asset.

Clear ( ) : void

Clear asset cache.

Close ( ) : void

Close region module.

Expire ( string id ) : void

Expire (remove) asset stored to cache.

Get ( string id ) : OpenSim.Framework.AssetBase

Get asset stored

Caller should always check that is return value . Cache doesn't guarantee in any situation that asset is stored to it.

Initialise ( IConfigSource source ) : void

Initialize region module.

PostInitialise ( ) : void

Initialization post handling.

Modules can use this to initialize connection with other modules.

RegionLoaded ( Scene scene ) : void

Region has been loaded.

This is needed for all module types. Modules will register Interfaces with scene in AddScene, and will also need a means to access interfaces registered by other modules. Without this extra method, a module attempting to use another modules' interface would be successful only depending on load order, which can't be depended upon, or modules would need to resort to ugly kludges to attempt to request interfaces when needed and unnecessary caching logic repeated in all modules. The extra function stub is just that much cleaner.

RemoveRegion ( Scene scene ) : void

Region is being removed.

Protected Methods

Method Description
Initialize ( long maximalSize, int maximalCount, System.TimeSpan expirationTime ) : void

Initialize asset cache module, with custom parameters.

Method Details

AddRegion() public method

New region is being added to server.
public AddRegion ( Scene scene ) : void
scene OpenSim.Region.Framework.Scenes.Scene /// Region's scene. ///
return void

Cache() public method

Cache asset.
public Cache ( OpenSim.Framework.AssetBase asset ) : void
asset OpenSim.Framework.AssetBase /// The asset that is being cached. ///
return void

Clear() public method

Clear asset cache.
public Clear ( ) : void
return void

Close() public method

Close region module.
public Close ( ) : void
return void

Expire() public method

Expire (remove) asset stored to cache.
public Expire ( string id ) : void
id string /// The expired asset's id. ///
return void

Get() public method

Get asset stored

Caller should always check that is return value . Cache doesn't guarantee in any situation that asset is stored to it.

public Get ( string id ) : OpenSim.Framework.AssetBase
id string /// The asset's id. ///
return OpenSim.Framework.AssetBase

Initialise() public method

Initialize region module.
public Initialise ( IConfigSource source ) : void
source IConfigSource /// Configuration source. ///
return void

Initialize() protected method

Initialize asset cache module, with custom parameters.
protected Initialize ( long maximalSize, int maximalCount, System.TimeSpan expirationTime ) : void
maximalSize long /// Cache's maximal size in bytes. ///
maximalCount int /// Cache's maximal count of assets. ///
expirationTime System.TimeSpan /// Asset's expiration time. ///
return void

PostInitialise() public method

Initialization post handling.

Modules can use this to initialize connection with other modules.

public PostInitialise ( ) : void
return void

RegionLoaded() public method

Region has been loaded.

This is needed for all module types. Modules will register Interfaces with scene in AddScene, and will also need a means to access interfaces registered by other modules. Without this extra method, a module attempting to use another modules' interface would be successful only depending on load order, which can't be depended upon, or modules would need to resort to ugly kludges to attempt to request interfaces when needed and unnecessary caching logic repeated in all modules. The extra function stub is just that much cleaner.

public RegionLoaded ( Scene scene ) : void
scene OpenSim.Region.Framework.Scenes.Scene /// Region's scene. ///
return void

RemoveRegion() public method

Region is being removed.
public RemoveRegion ( Scene scene ) : void
scene OpenSim.Region.Framework.Scenes.Scene /// Region scene that is being removed. ///
return void

Property Details

DefaultExpirationTime public static property

Asset's default expiration time in the cache.
public static TimeSpan,System DefaultExpirationTime
return System.TimeSpan