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.
This commit is contained in:
Sean Dague
2009-02-09 21:47:55 +00:00
parent 70051278c4
commit 8088802c21
27 changed files with 85 additions and 68 deletions

View File

@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment
/// <returns></returns>
public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
AssetCache assetCache, AgentCircuitManager authenticateClass)
IAssetCache assetCache, AgentCircuitManager authenticateClass)
{
return CreateServer(
_listenIP, ref port, proxyPortOffset, allow_alternate_port, null, assetCache, authenticateClass);
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment
/// <returns></returns>
public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager authenticateClass)
IAssetCache assetCache, AgentCircuitManager authenticateClass)
{
if (plugin != null)
{

View File

@@ -38,7 +38,7 @@ namespace OpenSim.Region.ClientStack
{
void Initialise(
IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager authenticateClass);
IAssetCache assetCache, AgentCircuitManager authenticateClass);
Socket Server { get; }
bool HandlesRegion(Location x);

View File

@@ -65,7 +65,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int m_debugPacketLevel;
private readonly AssetCache m_assetCache;
private readonly IAssetCache m_assetCache;
private int m_cachedTextureSerial;
private Timer m_clientPingTimer;
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Constructor
/// </summary>
public LLClientView(
EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
EndPoint remoteEP, IScene scene, IAssetCache assetCache, LLPacketServer packServer,
AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
ClientStackUserSettings userSettings)
{
@@ -3748,7 +3748,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerGenericMessage(sender, method, msg);
return true;
}
catch(Exception e)
catch (Exception e)
{
m_log.Error("[GENERICMESSAGE] " + e);
}

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
new Dictionary<UUID, IPriorityQueueHandle<Prio<J2KImage>>>();
private LLClientView m_client;
private readonly AssetCache m_assetCache;
private readonly IAssetCache m_assetCache;
private bool m_shuttingdown = false;
private readonly IJ2KDecoder m_j2kDecodeModule;
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="client">LLClientView of client</param>
/// <param name="pAssetCache">The Asset retrieval system</param>
/// <param name="pJ2kDecodeModule">The Jpeg2000 Decoder</param>
public LLImageManager(LLClientView client, AssetCache pAssetCache, IJ2KDecoder pJ2kDecodeModule)
public LLImageManager(LLClientView client, IAssetCache pAssetCache, IJ2KDecoder pJ2kDecodeModule)
{
m_client = client;
m_assetCache = pAssetCache;

View File

@@ -90,7 +90,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="proxyEP"></param>
/// <returns></returns>
protected virtual IClientAPI CreateNewCircuit(
EndPoint remoteEP, IScene scene, AssetCache assetCache,
EndPoint remoteEP, IScene scene, IAssetCache assetCache,
LLPacketServer packServer, AuthenticateResponse sessionInfo,
UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP)
{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// true if a new circuit was created, false if a circuit with the given circuit code already existed
/// </returns>
public virtual bool AddNewClient(
EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache,
EndPoint epSender, UseCircuitCodePacket useCircuit, IAssetCache assetCache,
AuthenticateResponse sessionInfo, EndPoint proxyEP)
{
IClientAPI newuser;

View File

@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected bool Allow_Alternate_Port;
protected IPAddress listenIP = IPAddress.Parse("0.0.0.0");
protected IScene m_localScene;
protected AssetCache m_assetCache;
protected IAssetCache m_assetCache;
/// <value>
/// Manages authentication for agent circuits
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public LLUDPServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager authenticateClass)
IAssetCache assetCache, AgentCircuitManager authenticateClass)
{
Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource, assetCache, authenticateClass);
}
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="circuitManager"></param>
public void Initialise(
IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource,
AssetCache assetCache, AgentCircuitManager circuitManager)
IAssetCache assetCache, AgentCircuitManager circuitManager)
{
ClientStackUserSettings userSettings = new ClientStackUserSettings();

View File

@@ -48,7 +48,7 @@ namespace OpenSim.Region.ClientStack
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected AssetCache m_assetCache;
protected IAssetCache m_assetCache;
protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>();
protected NetworkServersInfo m_networkServersInfo;