Inheritance diagram for OpenSim::Framework::Communications::Cache::AssetCache:

Public Member Functions | |
| void | ShowState () |
| Report statistical data. | |
| void | Clear () |
| Clear the asset cache. | |
| AssetCache (IAssetServer assetServer) | |
| Constructor. Initialize will need to be called separately. | |
| void | RunAssetManager () |
| Process the asset queue which holds data which is packeted up and sent directly back to the client. | |
| bool | TryGetCachedAsset (UUID assetId, out AssetBase asset) |
| Only get an asset if we already have it in the cache. | |
| void | GetAsset (UUID assetId, AssetRequestCallback callback, bool isTexture) |
| Asynchronously retrieve an asset. | |
| AssetBase | GetAsset (UUID assetID, bool isTexture) |
| Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to load it into the cache. | |
| void | AddAsset (AssetBase asset) |
| Add an asset to both the persistent store and the cache. | |
| void | ExpireAsset (UUID uuid) |
| Allows you to clear a specific asset by uuid out of the asset cache. This is needed because the osdynamic texture code grows the asset cache without bounds. The real solution here is a much better cache archicture, but this is a stop gap measure until we have such a thing. | |
| void | AssetReceived (AssetBase asset, bool IsTexture) |
| Call back made when a requested asset has been retrieved by an asset server. | |
| void | AssetNotFound (UUID assetID, bool IsTexture) |
| Call back made when an asset server could not retrieve a requested asset. | |
| void | AddAssetRequest (IClientAPI userInfo, TransferRequestPacket transferRequest) |
| Handle an asset request from the client. The result will be sent back asynchronously. | |
Protected Attributes | |
| ICache | m_memcache = new SimpleMemoryCache() |
Properties | |
| IAssetServer | AssetServer [get] |
Classes | |
| class | AssetInfo |
| class | AssetRequest |
| class | AssetRequestsList |
| A list of requests for a particular asset. More... | |
| class | NewAssetRequest |
| Represent a request for an asset that has yet to be fulfilled. More... | |
| class | TextureImage |
This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either synchronously or async and passes the data back to the requester. The second mechanism fetches assets and sends packetised data directly back to the client. The only point where they meet is AssetReceived() and AssetNotFound(), which means they do share the same asset and texture caches.
TODO: Assets in this cache are effectively immortal (they are never disposed of through old age). This is not a huge problem at the moment since other memory use usually dwarfs that used by assets but it's something to bear in mind.
| OpenSim::Framework::Communications::Cache::AssetCache::AssetCache | ( | IAssetServer | assetServer | ) | [inline] |
Constructor. Initialize will need to be called separately.
| assetServer |
| void OpenSim::Framework::Communications::Cache::AssetCache::ShowState | ( | ) | [inline] |
Report statistical data.
| void OpenSim::Framework::Communications::Cache::AssetCache::Clear | ( | ) | [inline] |
Clear the asset cache.
| void OpenSim::Framework::Communications::Cache::AssetCache::RunAssetManager | ( | ) | [inline] |
Process the asset queue which holds data which is packeted up and sent directly back to the client.
| bool OpenSim::Framework::Communications::Cache::AssetCache::TryGetCachedAsset | ( | UUID | assetId, | |
| out AssetBase | asset | |||
| ) | [inline] |
Only get an asset if we already have it in the cache.
| assetId | ||
| asset |
| void OpenSim::Framework::Communications::Cache::AssetCache::GetAsset | ( | UUID | assetId, | |
| AssetRequestCallback | callback, | |||
| bool | isTexture | |||
| ) | [inline] |
Asynchronously retrieve an asset.
| assetId | |||||
| callback |
|
| AssetBase OpenSim::Framework::Communications::Cache::AssetCache::GetAsset | ( | UUID | assetID, | |
| bool | isTexture | |||
| ) | [inline] |
Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to load it into the cache.
XXX We'll keep polling the cache until we get the asset or we exceed the allowed number of polls. This isn't a very good way of doing things since a single thread is processing inbound packets, so if the asset server is slow, we could block this for up to the timeout period. Whereever possible we want to use the asynchronous callback GetAsset()
| assetID | ||
| isTexture |
| void OpenSim::Framework::Communications::Cache::AssetCache::AddAsset | ( | AssetBase | asset | ) | [inline] |
Add an asset to both the persistent store and the cache.
| asset |
| void OpenSim::Framework::Communications::Cache::AssetCache::ExpireAsset | ( | UUID | uuid | ) | [inline] |
Allows you to clear a specific asset by uuid out of the asset cache. This is needed because the osdynamic texture code grows the asset cache without bounds. The real solution here is a much better cache archicture, but this is a stop gap measure until we have such a thing.
| void OpenSim::Framework::Communications::Cache::AssetCache::AssetReceived | ( | AssetBase | asset, | |
| bool | IsTexture | |||
| ) | [inline] |
Call back made when a requested asset has been retrieved by an asset server.
| asset | ||
| IsTexture |
Implements OpenSim::Framework::IAssetReceiver.
| void OpenSim::Framework::Communications::Cache::AssetCache::AssetNotFound | ( | UUID | assetID, | |
| bool | IsTexture | |||
| ) | [inline] |
Call back made when an asset server could not retrieve a requested asset.
| assetID | ||
| IsTexture |
Implements OpenSim::Framework::IAssetReceiver.
| void OpenSim::Framework::Communications::Cache::AssetCache::AddAssetRequest | ( | IClientAPI | userInfo, | |
| TransferRequestPacket | transferRequest | |||
| ) | [inline] |
Handle an asset request from the client. The result will be sent back asynchronously.
| userInfo | ||
| transferRequest |
ICache OpenSim::Framework::Communications::Cache::AssetCache::m_memcache = new SimpleMemoryCache() [protected] |
IAssetServer OpenSim::Framework::Communications::Cache::AssetCache::AssetServer [get] |
1.5.1