diff options
author | Kunnis | 2009-12-06 17:56:29 -0600 |
---|---|---|
committer | Melanie | 2009-12-12 04:13:39 +0000 |
commit | 62ec60ca76e2331b6dd91b4ab68420fd859ea76c (patch) | |
tree | 9adeb202995de80a983e16cfdef8824d7c3f5d60 /OpenSim/Framework/IAssetCache.cs | |
parent | Refix the fix (diff) | |
download | opensim-SC-62ec60ca76e2331b6dd91b4ab68420fd859ea76c.zip opensim-SC-62ec60ca76e2331b6dd91b4ab68420fd859ea76c.tar.gz opensim-SC-62ec60ca76e2331b6dd91b4ab68420fd859ea76c.tar.bz2 opensim-SC-62ec60ca76e2331b6dd91b4ab68420fd859ea76c.tar.xz |
Getting rid of a bunch of old classes, that are likely left over from the ROBUST change.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Framework/IAssetCache.cs')
-rw-r--r-- | OpenSim/Framework/IAssetCache.cs | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs deleted file mode 100644 index 654180d..0000000 --- a/OpenSim/Framework/IAssetCache.cs +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenMetaverse; | ||
29 | using OpenMetaverse.Packets; | ||
30 | |||
31 | namespace OpenSim.Framework | ||
32 | { | ||
33 | public delegate void AssetRequestCallback(UUID assetId, AssetBase asset); | ||
34 | |||
35 | /// <summary> | ||
36 | /// Interface to the local asset cache. This is the mechanism through which assets can be added and requested. | ||
37 | /// </summary> | ||
38 | public interface IAssetCache : IPlugin | ||
39 | { | ||
40 | /// <value> | ||
41 | /// The 'server' from which assets can be requested and to which assets are persisted. | ||
42 | /// </value> | ||
43 | |||
44 | void Initialise(ConfigSettings cs); | ||
45 | |||
46 | /// <summary> | ||
47 | /// Report statistical data to the log. | ||
48 | /// </summary> | ||
49 | void ShowState(); | ||
50 | |||
51 | /// <summary> | ||
52 | /// Clear the asset cache. | ||
53 | /// </summary> | ||
54 | void Clear(); | ||
55 | |||
56 | /// <summary> | ||
57 | /// Get an asset only if it's already in the cache. | ||
58 | /// </summary> | ||
59 | /// <param name="assetId"></param> | ||
60 | /// <param name="asset"></param> | ||
61 | /// <returns>true if the asset was in the cache, false if it was not</returns> | ||
62 | bool TryGetCachedAsset(UUID assetID, out AssetBase asset); | ||
63 | |||
64 | /// <summary> | ||
65 | /// Asynchronously retrieve an asset. | ||
66 | /// </summary> | ||
67 | /// <param name="assetId"></param> | ||
68 | /// <param name="callback"> | ||
69 | /// <param name="isTexture"></param> | ||
70 | /// A callback invoked when the asset has either been found or not found. | ||
71 | /// If the asset was found this is called with the asset UUID and the asset data | ||
72 | /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> | ||
73 | void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture); | ||
74 | |||
75 | /// <summary> | ||
76 | /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to | ||
77 | /// load it into the cache. | ||
78 | /// </summary> | ||
79 | /// | ||
80 | /// XXX We'll keep polling the cache until we get the asset or we exceed | ||
81 | /// the allowed number of polls. This isn't a very good way of doing things since a single thread | ||
82 | /// is processing inbound packets, so if the asset server is slow, we could block this for up to | ||
83 | /// the timeout period. Whereever possible we want to use the asynchronous callback GetAsset() | ||
84 | /// | ||
85 | /// <param name="assetID"></param> | ||
86 | /// <param name="isTexture"></param> | ||
87 | /// <returns>null if the asset could not be retrieved</returns> | ||
88 | AssetBase GetAsset(UUID assetID, bool isTexture); | ||
89 | |||
90 | /// <summary> | ||
91 | /// Add an asset to both the persistent store and the cache. | ||
92 | /// </summary> | ||
93 | /// <param name="asset"></param> | ||
94 | void AddAsset(AssetBase asset); | ||
95 | |||
96 | /// <summary> | ||
97 | /// Expire an asset from the cache | ||
98 | /// </summary> | ||
99 | /// Allows you to clear a specific asset by uuid out | ||
100 | /// of the asset cache. This is needed because the osdynamic | ||
101 | /// texture code grows the asset cache without bounds. The | ||
102 | /// real solution here is a much better cache archicture, but | ||
103 | /// this is a stop gap measure until we have such a thing. | ||
104 | void ExpireAsset(UUID assetID); | ||
105 | |||
106 | /// <summary> | ||
107 | /// Handle an asset request from the client. The result will be sent back asynchronously. | ||
108 | /// </summary> | ||
109 | /// <param name="userInfo"></param> | ||
110 | /// <param name="transferRequest"></param> | ||
111 | void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest); | ||
112 | } | ||
113 | |||
114 | } | ||