aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorSean Dague2009-02-09 21:47:55 +0000
committerSean Dague2009-02-09 21:47:55 +0000
commit8088802c218d7eb4a47018b5b3bb70e7463a03b1 (patch)
treeac22b97c3dce09a91bae18b5840f8654813dcfc8 /OpenSim/Framework
parentThank you kindly, TLaukkan (Tommil) for a patch that: (diff)
downloadopensim-SC_OLD-8088802c218d7eb4a47018b5b3bb70e7463a03b1.zip
opensim-SC_OLD-8088802c218d7eb4a47018b5b3bb70e7463a03b1.tar.gz
opensim-SC_OLD-8088802c218d7eb4a47018b5b3bb70e7463a03b1.tar.bz2
opensim-SC_OLD-8088802c218d7eb4a47018b5b3bb70e7463a03b1.tar.xz
From Alan Webb <awebb@linux.vnet.ibm.com>
These changes replace all direct references to the AssetCache with IAssetCache. There is no change to functionality. Everything works as before. This is laying the groundwork for making it possible to register alternative asset caching mechanisms without disrupting other parts of OpenSim or their dependencies upon AssetCache functionality.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs7
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs4
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs6
3 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 2b2467c..2296e46 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -37,7 +37,7 @@ using GlynnTucker.Cache;
37 37
38namespace OpenSim.Framework.Communications.Cache 38namespace OpenSim.Framework.Communications.Cache
39{ 39{
40 public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); 40 // public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
41 41
42 /// <summary> 42 /// <summary>
43 /// Manages local cache of assets and their sending to viewers. 43 /// Manages local cache of assets and their sending to viewers.
@@ -47,7 +47,8 @@ namespace OpenSim.Framework.Communications.Cache
47 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and 47 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
48 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and 48 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
49 /// AssetNotFound(), which means they do share the same asset and texture caches.I agr 49 /// AssetNotFound(), which means they do share the same asset and texture caches.I agr
50 public class AssetCache : IAssetReceiver 50
51 public class AssetCache : IAssetCache, IAssetReceiver
51 { 52 {
52 protected ICache m_memcache = new SimpleMemoryCache(); 53 protected ICache m_memcache = new SimpleMemoryCache();
53 54
@@ -148,7 +149,7 @@ namespace OpenSim.Framework.Communications.Cache
148 /// Process the asset queue which holds data which is packeted up and sent 149 /// Process the asset queue which holds data which is packeted up and sent
149 /// directly back to the client. 150 /// directly back to the client.
150 /// </summary> 151 /// </summary>
151 public void RunAssetManager() 152 private void RunAssetManager()
152 { 153 {
153 while (true) 154 while (true)
154 { 155 {
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 25a69f7..cfe9002 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications.Capabilities
98 //private string eventQueue = "0100/"; 98 //private string eventQueue = "0100/";
99 private BaseHttpServer m_httpListener; 99 private BaseHttpServer m_httpListener;
100 private UUID m_agentID; 100 private UUID m_agentID;
101 private AssetCache m_assetCache; 101 private IAssetCache m_assetCache;
102 private int m_eventQueueCount = 1; 102 private int m_eventQueueCount = 1;
103 private Queue<string> m_capsEventQueue = new Queue<string>(); 103 private Queue<string> m_capsEventQueue = new Queue<string>();
104 private bool m_dumpAssetsToFile; 104 private bool m_dumpAssetsToFile;
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Communications.Capabilities
121 public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null; 121 public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null;
122 public GetClientDelegate GetClient = null; 122 public GetClientDelegate GetClient = null;
123 123
124 public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, 124 public Caps(IAssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
125 UUID agent, bool dumpAssetsToFile, string regionName) 125 UUID agent, bool dumpAssetsToFile, string regionName)
126 { 126 {
127 m_assetCache = assetCache; 127 m_assetCache = assetCache;
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index b4af991..2107f63 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -87,11 +87,11 @@ namespace OpenSim.Framework.Communications
87 } 87 }
88 protected IAvatarService m_avatarService; 88 protected IAvatarService m_avatarService;
89 89
90 public AssetCache AssetCache 90 public IAssetCache AssetCache
91 { 91 {
92 get { return m_assetCache; } 92 get { return m_assetCache; }
93 } 93 }
94 protected AssetCache m_assetCache; 94 protected IAssetCache m_assetCache;
95 95
96 public IInterServiceInventoryServices InterServiceInventoryService 96 public IInterServiceInventoryServices InterServiceInventoryService
97 { 97 {
@@ -127,7 +127,7 @@ namespace OpenSim.Framework.Communications
127 /// <param name="httpServer"></param> 127 /// <param name="httpServer"></param>
128 /// <param name="assetCache"></param> 128 /// <param name="assetCache"></param>
129 /// <param name="dumpAssetsToFile"></param> 129 /// <param name="dumpAssetsToFile"></param>
130 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, 130 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache,
131 bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder) 131 bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
132 { 132 {
133 m_networkServersInfo = serversInfo; 133 m_networkServersInfo = serversInfo;