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
{
public interface IImprovedAssetCache
public interface IAssetCache
{
/// <summary>
/// Cache the specified asset.
@ -61,4 +61,4 @@ namespace OpenSim.Framework
/// </summary>
void Clear();
}
}
}

View File

@ -50,7 +50,7 @@ namespace OpenSim.Framework
return retitems;
}
public static WearableCacheItem[] FromOSD(OSD pInput, IImprovedAssetCache dataCache)
public static WearableCacheItem[] FromOSD(OSD pInput, IAssetCache dataCache)
{
List<WearableCacheItem> ret = new List<WearableCacheItem>();
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();
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>
private readonly Dictionary<UUID, List<DecodedCallback>> m_notifyList = new Dictionary<UUID, List<DecodedCallback>>();
/// <summary>Cache that will store decoded JPEG2000 layer boundary data</summary>
private IImprovedAssetCache m_cache;
private IImprovedAssetCache Cache
private IAssetCache m_cache;
private IAssetCache Cache
{
get
{
if (m_cache == null)
m_cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
m_cache = m_scene.RequestModuleInterface<IAssetCache>();
return m_cache;
}

View File

@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Asset
/// </code>
/// </example>
[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);
@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.Asset
expirationTime);
}
#region IImprovedAssetCache Members
#region IAssetCache Members
public bool Check(string id)
{
@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.Asset
public void AddRegion(Scene scene)
{
if (m_enabled)
scene.RegisterModuleInterface<IImprovedAssetCache>(this);
scene.RegisterModuleInterface<IAssetCache>(this);
}
/// <summary>

View File

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

View File

@ -55,7 +55,7 @@ using OpenSim.Services.Interfaces;
namespace OpenSim.Region.CoreModules.Asset
{
[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 =
LogManager.GetLogger(
@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.Asset
{
if (m_Enabled)
{
scene.RegisterModuleInterface<IImprovedAssetCache>(this);
scene.RegisterModuleInterface<IAssetCache>(this);
m_Scenes.Add(scene);
}
}
@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.Asset
{
if (m_Enabled)
{
scene.UnregisterModuleInterface<IImprovedAssetCache>(this);
scene.UnregisterModuleInterface<IAssetCache>(this);
m_Scenes.Remove(scene);
lock(timerLock)
{
@ -271,7 +271,7 @@ namespace OpenSim.Region.CoreModules.Asset
}
////////////////////////////////////////////////////////////
// IImprovedAssetCache
// IAssetCache
//
private void UpdateWeakReference(string key, AssetBase asset)
{

View File

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

View File

@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
if (bakedTextures.Count == 0)
return false;
IImprovedAssetCache cache = sp.Scene.RequestModuleInterface<IImprovedAssetCache>();
IAssetCache cache = sp.Scene.RequestModuleInterface<IAssetCache>();
if(cache == null)
return true; // no baked local caching so nothing to do
@ -705,7 +705,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return 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++)
{

View File

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

View File

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

View File

@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
MethodBase.GetCurrentMethod().DeclaringType);
private bool m_Enabled = false;
private IImprovedAssetCache m_Cache;
private IAssetCache m_Cache;
public Type ReplaceableInterface
{
@ -111,7 +111,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
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
// 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; } }
IImprovedAssetCache m_cache;
IAssetCache m_cache;
private Scene m_scene = null;
private bool m_enabled = false;
private int m_maxMaterialsPerTransaction = 50;
@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Materials
{
if (!m_enabled) return;
m_cache = scene.RequestModuleInterface<IImprovedAssetCache>();
m_cache = scene.RequestModuleInterface<IAssetCache>();
ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>();
if (featuresModule != null)
featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Services.Connectors
const int MAXSENDRETRIESLEN = 30;
private string m_ServerURI = String.Empty;
private IImprovedAssetCache m_Cache = null;
private IAssetCache m_Cache = null;
private int m_retryCounter;
private bool m_inRetries;
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;
}

View File

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