aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJohn Hurliman2010-04-08 12:31:44 -0700
committerJohn Hurliman2010-04-08 12:31:44 -0700
commit3f6c4c150e3910e79ee3dc94f9304c16265512c0 (patch)
treeca83d44c56ab70535dfe04f068f5d0bfd1abb7da /OpenSim/Services
parent* Fixing incorrect documentation for the continuation passing style IAssetSer... (diff)
downloadopensim-SC_OLD-3f6c4c150e3910e79ee3dc94f9304c16265512c0.zip
opensim-SC_OLD-3f6c4c150e3910e79ee3dc94f9304c16265512c0.tar.gz
opensim-SC_OLD-3f6c4c150e3910e79ee3dc94f9304c16265512c0.tar.bz2
opensim-SC_OLD-3f6c4c150e3910e79ee3dc94f9304c16265512c0.tar.xz
* Adds IAssetService.GetCached() to allow asset fetching from the local cache only
* Adds GetTextureModule that implements the "GetTexture" capability, aka HTTP texture fetching. This is a significantly optimized path that does not require any server-side JPEG2000 decoding, texture priority queue, or UDP file transfer * Sanity check for null reference in LLClientView.RefreshGroupMembership()
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs5
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs14
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs8
-rw-r--r--OpenSim/Services/Interfaces/IAssetService.cs7
5 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index b9723a8..ed87f3f 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -93,6 +93,11 @@ namespace OpenSim.Services.AssetService
93 return m_Database.GetAsset(assetID); 93 return m_Database.GetAsset(assetID);
94 } 94 }
95 95
96 public AssetBase GetCached(string id)
97 {
98 return Get(id);
99 }
100
96 public AssetMetadata GetMetadata(string id) 101 public AssetMetadata GetMetadata(string id)
97 { 102 {
98 UUID assetID; 103 UUID assetID;
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
index a5c157d..65b3537 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
@@ -111,6 +111,14 @@ namespace OpenSim.Services.Connectors
111 return asset; 111 return asset;
112 } 112 }
113 113
114 public AssetBase GetCached(string id)
115 {
116 if (m_Cache != null)
117 return m_Cache.Get(id);
118
119 return null;
120 }
121
114 public AssetMetadata GetMetadata(string id) 122 public AssetMetadata GetMetadata(string id)
115 { 123 {
116 if (m_Cache != null) 124 if (m_Cache != null)
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
index 677169d..34df54a 100644
--- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
@@ -116,6 +116,20 @@ namespace OpenSim.Services.Connectors
116 return null; 116 return null;
117 } 117 }
118 118
119 public AssetBase GetCached(string id)
120 {
121 string url = string.Empty;
122 string assetID = string.Empty;
123
124 if (StringToUrlAndAssetID(id, out url, out assetID))
125 {
126 IAssetService connector = GetConnector(url);
127 return connector.GetCached(assetID);
128 }
129
130 return null;
131 }
132
119 public AssetMetadata GetMetadata(string id) 133 public AssetMetadata GetMetadata(string id)
120 { 134 {
121 string url = string.Empty; 135 string url = string.Empty;
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 36c51c3..79e49a1 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -123,6 +123,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
123 return GetRemote(id); 123 return GetRemote(id);
124 } 124 }
125 125
126 public AssetBase GetCached(string id)
127 {
128 if (m_cache != null)
129 return m_cache.Get(id);
130
131 return null;
132 }
133
126 /// <summary> 134 /// <summary>
127 /// Get an asset's metadata 135 /// Get an asset's metadata
128 /// </summary> 136 /// </summary>
diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index f8bedfe..3be6815 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -51,6 +51,13 @@ namespace OpenSim.Services.Interfaces
51 byte[] GetData(string id); 51 byte[] GetData(string id);
52 52
53 /// <summary> 53 /// <summary>
54 /// Synchronously fetches an asset from the local cache only
55 /// </summary>
56 /// <param name="id">Asset ID</param>
57 /// <returns>The fetched asset, or null if it did not exist in the local cache</returns>
58 AssetBase GetCached(string id);
59
60 /// <summary>
54 /// Get an asset synchronously or asynchronously (depending on whether 61 /// Get an asset synchronously or asynchronously (depending on whether
55 /// it is locally cached) and fire a callback with the fetched asset 62 /// it is locally cached) and fire a callback with the fetched asset
56 /// </summary> 63 /// </summary>