diff options
author | Melanie | 2010-04-13 04:13:26 +0100 |
---|---|---|
committer | Melanie | 2010-04-13 04:13:26 +0100 |
commit | a1c4585a392955bb80452da94002414ab0c6a269 (patch) | |
tree | d42f39aa7f00289888a305e38b0cab1fbc1bab65 /OpenSim/Services | |
parent | Fixed LINEAR_MOTOR Z drive, Mantis #30 (diff) | |
parent | Changed the GetTextureModule backport to work with the 0.6.9 codebase (diff) | |
download | opensim-SC-a1c4585a392955bb80452da94002414ab0c6a269.zip opensim-SC-a1c4585a392955bb80452da94002414ab0c6a269.tar.gz opensim-SC-a1c4585a392955bb80452da94002414ab0c6a269.tar.bz2 opensim-SC-a1c4585a392955bb80452da94002414ab0c6a269.tar.xz |
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to '')
4 files changed, 36 insertions, 1 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 8e311d7..84fbcd3 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/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs index 6dfe78d..3be6815 100644 --- a/OpenSim/Services/Interfaces/IAssetService.cs +++ b/OpenSim/Services/Interfaces/IAssetService.cs | |||
@@ -51,7 +51,15 @@ namespace OpenSim.Services.Interfaces | |||
51 | byte[] GetData(string id); | 51 | byte[] GetData(string id); |
52 | 52 | ||
53 | /// <summary> | 53 | /// <summary> |
54 | /// Get an asset asynchronously | 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> | ||
61 | /// Get an asset synchronously or asynchronously (depending on whether | ||
62 | /// it is locally cached) and fire a callback with the fetched asset | ||
55 | /// </summary> | 63 | /// </summary> |
56 | /// <param name="id">The asset id</param> | 64 | /// <param name="id">The asset id</param> |
57 | /// <param name="sender">Represents the requester. Passed back via the handler</param> | 65 | /// <param name="sender">Represents the requester. Passed back via the handler</param> |