Refactor: Rename IImprovedAssetCache to IAssetCache as the old IAssetCache is long gone.

melanie
Melanie Thielker 2016-12-29 12:34:09 +00:00
parent feca9fd153
commit f021c64eb0
15 changed files with 36 additions and 36 deletions

View File

@ -29,7 +29,7 @@ using OpenSim.Framework;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
public interface IImprovedAssetCache public interface IAssetCache
{ {
/// <summary> /// <summary>
/// Cache the specified asset. /// Cache the specified asset.

View File

@ -50,7 +50,7 @@ namespace OpenSim.Framework
return retitems; return retitems;
} }
public static WearableCacheItem[] FromOSD(OSD pInput, IImprovedAssetCache dataCache) public static WearableCacheItem[] FromOSD(OSD pInput, IAssetCache dataCache)
{ {
List<WearableCacheItem> ret = new List<WearableCacheItem>(); List<WearableCacheItem> ret = new List<WearableCacheItem>();
if (pInput.Type == OSDType.Array) if (pInput.Type == OSDType.Array)
@ -100,7 +100,7 @@ namespace OpenSim.Framework
} }
public static OSD ToOSD(WearableCacheItem[] pcacheItems, IImprovedAssetCache dataCache) public static OSD ToOSD(WearableCacheItem[] pcacheItems, IAssetCache dataCache)
{ {
OSDArray arr = new OSDArray(); OSDArray arr = new OSDArray();
foreach (WearableCacheItem item in pcacheItems) foreach (WearableCacheItem item in pcacheItems)

View File

@ -57,13 +57,13 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
/// <summary>List of client methods to notify of results of decode</summary> /// <summary>List of client methods to notify of results of decode</summary>
private readonly Dictionary<UUID, List<DecodedCallback>> m_notifyList = new Dictionary<UUID, List<DecodedCallback>>(); private readonly Dictionary<UUID, List<DecodedCallback>> m_notifyList = new Dictionary<UUID, List<DecodedCallback>>();
/// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary> /// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary>
private IImprovedAssetCache m_cache; private IAssetCache m_cache;
private IImprovedAssetCache Cache private IAssetCache Cache
{ {
get get
{ {
if (m_cache == null) if (m_cache == null)
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); m_cache = m_scene.RequestModuleInterface<IAssetCache>();
return m_cache; return m_cache;
} }

View File

@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Asset
/// </code> /// </code>
/// </example> /// </example>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CenomeMemoryAssetCache")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CenomeMemoryAssetCache")]
public class CenomeMemoryAssetCache : IImprovedAssetCache, ISharedRegionModule public class CenomeMemoryAssetCache : IAssetCache, ISharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Asset
expirationTime); expirationTime);
} }
#region IImprovedAssetCache Members #region IAssetCache Members
public bool Check(string id) public bool Check(string id)
{ {
@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.Asset
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
if (m_enabled) if (m_enabled)
scene.RegisterModuleInterface<IImprovedAssetCache>(this); scene.RegisterModuleInterface<IAssetCache>(this);
} }
/// <summary> /// <summary>

View File

@ -40,7 +40,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Asset namespace OpenSim.Region.CoreModules.Asset
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CoreAssetCache")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "CoreAssetCache")]
public class CoreAssetCache : ISharedRegionModule, IImprovedAssetCache public class CoreAssetCache : ISharedRegionModule, IAssetCache
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Asset
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
if (m_Enabled) if (m_Enabled)
scene.RegisterModuleInterface<IImprovedAssetCache>(this); scene.RegisterModuleInterface<IAssetCache>(this);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// IImprovedAssetCache // IAssetCache
// //
public bool Check(string id) public bool Check(string id)
{ {

View File

@ -55,7 +55,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Asset namespace OpenSim.Region.CoreModules.Asset
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FlotsamAssetCache")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FlotsamAssetCache")]
public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService public class FlotsamAssetCache : ISharedRegionModule, IAssetCache, IAssetService
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
if (m_Enabled) if (m_Enabled)
{ {
scene.RegisterModuleInterface<IImprovedAssetCache>(this); scene.RegisterModuleInterface<IAssetCache>(this);
m_Scenes.Add(scene); m_Scenes.Add(scene);
} }
} }
@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
if (m_Enabled) if (m_Enabled)
{ {
scene.UnregisterModuleInterface<IImprovedAssetCache>(this); scene.UnregisterModuleInterface<IAssetCache>(this);
m_Scenes.Remove(scene); m_Scenes.Remove(scene);
lock(timerLock) lock(timerLock)
{ {
@ -271,7 +271,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// IImprovedAssetCache // IAssetCache
// //
private void UpdateWeakReference(string key, AssetBase asset) private void UpdateWeakReference(string key, AssetBase asset)
{ {

View File

@ -41,7 +41,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Asset namespace OpenSim.Region.CoreModules.Asset
{ {
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GlynnTuckerAssetCache")] [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GlynnTuckerAssetCache")]
public class GlynnTuckerAssetCache : ISharedRegionModule, IImprovedAssetCache public class GlynnTuckerAssetCache : ISharedRegionModule, IAssetCache
{ {
private static readonly ILog m_log = private static readonly ILog m_log =
LogManager.GetLogger( LogManager.GetLogger(
@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Asset
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
if (m_Enabled) if (m_Enabled)
scene.RegisterModuleInterface<IImprovedAssetCache>(this); scene.RegisterModuleInterface<IAssetCache>(this);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// IImprovedAssetCache // IAssetCache
// //
public bool Check(string id) public bool Check(string id)

View File

@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
if (bakedTextures.Count == 0) if (bakedTextures.Count == 0)
return false; return false;
IImprovedAssetCache cache = sp.Scene.RequestModuleInterface<IImprovedAssetCache>(); IAssetCache cache = sp.Scene.RequestModuleInterface<IAssetCache>();
if(cache == null) if(cache == null)
return true; // no baked local caching so nothing to do return true; // no baked local caching so nothing to do
@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return 0; return 0;
int texturesRebaked = 0; int texturesRebaked = 0;
// IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); // IAssetCache cache = m_scene.RequestModuleInterface<IAssetCache>();
for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++)
{ {

View File

@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
Dictionary<UUID, UUID> m_classifiedCache = new Dictionary<UUID, UUID>(); Dictionary<UUID, UUID> m_classifiedCache = new Dictionary<UUID, UUID>();
Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>(); Dictionary<UUID, int> m_classifiedInterest = new Dictionary<UUID, int>();
ExpiringCache<UUID, UserProfileCacheEntry> m_profilesCache = new ExpiringCache<UUID, UserProfileCacheEntry>(); ExpiringCache<UUID, UserProfileCacheEntry> m_profilesCache = new ExpiringCache<UUID, UserProfileCacheEntry>();
IImprovedAssetCache m_assetCache; IAssetCache m_assetCache;
private JsonRpcRequestManager rpc = new JsonRpcRequestManager(); private JsonRpcRequestManager rpc = new JsonRpcRequestManager();
private bool m_allowUserProfileWebURLs = true; private bool m_allowUserProfileWebURLs = true;
@ -221,7 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
{ {
if(!Enabled) if(!Enabled)
return; return;
m_assetCache = Scene.RequestModuleInterface<IImprovedAssetCache>(); m_assetCache = Scene.RequestModuleInterface<IAssetCache>();
} }
/// <summary> /// <summary>

View File

@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
LogManager.GetLogger( LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private IImprovedAssetCache m_Cache = null; private IAssetCache m_Cache = null;
private IAssetService m_GridService; private IAssetService m_GridService;
private IAssetService m_HGService; private IAssetService m_HGService;
@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache == null) if (m_Cache == null)
{ {
m_Cache = scene.RequestModuleInterface<IImprovedAssetCache>(); m_Cache = scene.RequestModuleInterface<IAssetCache>();
if (!(m_Cache is ISharedRegionModule)) if (!(m_Cache is ISharedRegionModule))
m_Cache = null; m_Cache = null;

View File

@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IImprovedAssetCache m_Cache = null; private IAssetCache m_Cache = null;
private IAssetService m_AssetService; private IAssetService m_AssetService;
@ -128,7 +128,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache == null) if (m_Cache == null)
{ {
m_Cache = scene.RequestModuleInterface<IImprovedAssetCache>(); m_Cache = scene.RequestModuleInterface<IAssetCache>();
if (!(m_Cache is ISharedRegionModule)) if (!(m_Cache is ISharedRegionModule))
m_Cache = null; m_Cache = null;

View File

@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
MethodBase.GetCurrentMethod().DeclaringType); MethodBase.GetCurrentMethod().DeclaringType);
private bool m_Enabled = false; private bool m_Enabled = false;
private IImprovedAssetCache m_Cache; private IAssetCache m_Cache;
public Type ReplaceableInterface public Type ReplaceableInterface
{ {
@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache == null) if (m_Cache == null)
{ {
m_Cache = scene.RequestModuleInterface<IImprovedAssetCache>(); m_Cache = scene.RequestModuleInterface<IAssetCache>();
// Since we are a shared module and scene data is not // Since we are a shared module and scene data is not
// available for every method, the cache must be shared, too // available for every method, the cache must be shared, too

View File

@ -63,7 +63,7 @@ namespace OpenSim.Region.OptionalModules.Materials
public Type ReplaceableInterface { get { return null; } } public Type ReplaceableInterface { get { return null; } }
IImprovedAssetCache m_cache; IAssetCache m_cache;
private Scene m_scene = null; private Scene m_scene = null;
private bool m_enabled = false; private bool m_enabled = false;
private int m_maxMaterialsPerTransaction = 50; private int m_maxMaterialsPerTransaction = 50;
@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Materials
{ {
if (!m_enabled) return; if (!m_enabled) return;
m_cache = scene.RequestModuleInterface<IImprovedAssetCache>(); m_cache = scene.RequestModuleInterface<IAssetCache>();
ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>(); ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>();
if (featuresModule != null) if (featuresModule != null)
featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Services.Connectors
const int MAXSENDRETRIESLEN = 30; const int MAXSENDRETRIESLEN = 30;
private string m_ServerURI = String.Empty; private string m_ServerURI = String.Empty;
private IImprovedAssetCache m_Cache = null; private IAssetCache m_Cache = null;
private int m_retryCounter; private int m_retryCounter;
private bool m_inRetries; private bool m_inRetries;
private List<AssetBase>[] m_sendRetries = new List<AssetBase>[MAXSENDRETRIESLEN]; private List<AssetBase>[] m_sendRetries = new List<AssetBase>[MAXSENDRETRIESLEN];
@ -233,7 +233,7 @@ namespace OpenSim.Services.Connectors
} }
} }
protected void SetCache(IImprovedAssetCache cache) protected void SetCache(IAssetCache cache)
{ {
m_Cache = cache; m_Cache = cache;
} }

View File

@ -55,7 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
private static string ZeroID = UUID.Zero.ToString(); private static string ZeroID = UUID.Zero.ToString();
private string m_serverUrl = String.Empty; private string m_serverUrl = String.Empty;
private IImprovedAssetCache m_cache; private IAssetCache m_cache;
private bool m_Enabled = false; private bool m_Enabled = false;
#region ISharedRegionModule #region ISharedRegionModule
@ -65,7 +65,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
{ {
if (m_cache == null) if (m_cache == null)
{ {
IImprovedAssetCache cache = scene.RequestModuleInterface<IImprovedAssetCache>(); IAssetCache cache = scene.RequestModuleInterface<IAssetCache>();
if (cache is ISharedRegionModule) if (cache is ISharedRegionModule)
m_cache = cache; m_cache = cache;
} }