From Alan Webb <awebb@linux.vnet.ibm.com>

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.
0.6.3-post-fixes
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

@ -74,7 +74,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
internal static IInventoryServices InventoryServices = null; internal static IInventoryServices InventoryServices = null;
internal static IUserService UserServices = null; internal static IUserService UserServices = null;
internal static IAvatarService AvatarServices = null; internal static IAvatarService AvatarServices = null;
internal static AssetCache AssetServices = null; internal static IAssetCache AssetServices = null;
internal static string Prefix = null; internal static string Prefix = null;
internal static IConfig Config = null; internal static IConfig Config = null;
internal static string GodKey = null; internal static string GodKey = null;

View File

@ -37,7 +37,7 @@ using GlynnTucker.Cache;
namespace OpenSim.Framework.Communications.Cache namespace OpenSim.Framework.Communications.Cache
{ {
public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); // public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
/// <summary> /// <summary>
/// Manages local cache of assets and their sending to viewers. /// Manages local cache of assets and their sending to viewers.
@ -47,7 +47,8 @@ namespace OpenSim.Framework.Communications.Cache
/// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
/// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
/// AssetNotFound(), which means they do share the same asset and texture caches.I agr /// AssetNotFound(), which means they do share the same asset and texture caches.I agr
public class AssetCache : IAssetReceiver
public class AssetCache : IAssetCache, IAssetReceiver
{ {
protected ICache m_memcache = new SimpleMemoryCache(); protected ICache m_memcache = new SimpleMemoryCache();
@ -148,7 +149,7 @@ namespace OpenSim.Framework.Communications.Cache
/// Process the asset queue which holds data which is packeted up and sent /// Process the asset queue which holds data which is packeted up and sent
/// directly back to the client. /// directly back to the client.
/// </summary> /// </summary>
public void RunAssetManager() private void RunAssetManager()
{ {
while (true) while (true)
{ {

View File

@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications.Capabilities
//private string eventQueue = "0100/"; //private string eventQueue = "0100/";
private BaseHttpServer m_httpListener; private BaseHttpServer m_httpListener;
private UUID m_agentID; private UUID m_agentID;
private AssetCache m_assetCache; private IAssetCache m_assetCache;
private int m_eventQueueCount = 1; private int m_eventQueueCount = 1;
private Queue<string> m_capsEventQueue = new Queue<string>(); private Queue<string> m_capsEventQueue = new Queue<string>();
private bool m_dumpAssetsToFile; private bool m_dumpAssetsToFile;
@ -121,7 +121,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null; public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null;
public GetClientDelegate GetClient = null; public GetClientDelegate GetClient = null;
public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, public Caps(IAssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
UUID agent, bool dumpAssetsToFile, string regionName) UUID agent, bool dumpAssetsToFile, string regionName)
{ {
m_assetCache = assetCache; m_assetCache = assetCache;

View File

@ -87,11 +87,11 @@ namespace OpenSim.Framework.Communications
} }
protected IAvatarService m_avatarService; protected IAvatarService m_avatarService;
public AssetCache AssetCache public IAssetCache AssetCache
{ {
get { return m_assetCache; } get { return m_assetCache; }
} }
protected AssetCache m_assetCache; protected IAssetCache m_assetCache;
public IInterServiceInventoryServices InterServiceInventoryService public IInterServiceInventoryServices InterServiceInventoryService
{ {
@ -127,7 +127,7 @@ namespace OpenSim.Framework.Communications
/// <param name="httpServer"></param> /// <param name="httpServer"></param>
/// <param name="assetCache"></param> /// <param name="assetCache"></param>
/// <param name="dumpAssetsToFile"></param> /// <param name="dumpAssetsToFile"></param>
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache,
bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder) bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
{ {
m_networkServersInfo = serversInfo; m_networkServersInfo = serversInfo;

View File

@ -309,37 +309,53 @@ namespace OpenSim
/// </summary> /// </summary>
protected virtual void InitialiseAssetCache() protected virtual void InitialiseAssetCache()
{ {
// If the assetcache is set to default, then use the grid asset service in grid mode and the local database
// based asset service in standalone mode
IAssetServer assetServer; IAssetServer assetServer = null;
if (m_configSettings.AssetStorage == "grid" string mode = m_configSettings.AssetStorage;
|| (m_configSettings.AssetStorage == "default" && false == m_configSettings.Standalone))
if (m_configSettings.Standalone == false &&
m_configSettings.AssetStorage == "default")
mode = "grid";
switch (mode)
{ {
case "grid" :
assetServer = new GridAssetClient(m_networkServersInfo.AssetURL); assetServer = new GridAssetClient(m_networkServersInfo.AssetURL);
} break;
else if (m_configSettings.AssetStorage == "cryptogrid") // Decrypt-Only case "cryptogrid" :
{
assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL,
Environment.CurrentDirectory, true); Environment.CurrentDirectory, true);
} break;
else if (m_configSettings.AssetStorage == "cryptogrid_eou") // Encrypts All Assets case "cryptogrid_eou" :
{
assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL,
Environment.CurrentDirectory, false); Environment.CurrentDirectory, false);
} break;
else if (m_configSettings.AssetStorage == "file") case "file" :
{
assetServer = new FileAssetClient(m_networkServersInfo.AssetURL); assetServer = new FileAssetClient(m_networkServersInfo.AssetURL);
} break;
else default :
if (!ResolveAssetServer(out assetServer))
{ {
SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource); SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource);
sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile); sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile);
assetServer = sqlAssetServer; assetServer = sqlAssetServer;
} }
break;
}
m_assetCache = new AssetCache(assetServer); m_assetCache = ResolveAssetCache(assetServer);
}
private bool ResolveAssetServer(out IAssetServer assetServer)
{
assetServer = null;
return false;
}
private IAssetCache ResolveAssetCache(IAssetServer assetServer)
{
return new AssetCache(assetServer);
} }
public void ProcessLogin(bool LoginEnabled) public void ProcessLogin(bool LoginEnabled)

View File

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

View File

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

View File

@ -65,7 +65,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private int m_debugPacketLevel; private int m_debugPacketLevel;
private readonly AssetCache m_assetCache; private readonly IAssetCache m_assetCache;
private int m_cachedTextureSerial; private int m_cachedTextureSerial;
private Timer m_clientPingTimer; private Timer m_clientPingTimer;
@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Constructor /// Constructor
/// </summary> /// </summary>
public LLClientView( 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, AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
ClientStackUserSettings userSettings) ClientStackUserSettings userSettings)
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.Communications.Hypergrid
public HGCommunicationsGridMode( public HGCommunicationsGridMode(
NetworkServersInfo serversInfo, BaseHttpServer httpServer, NetworkServersInfo serversInfo, BaseHttpServer httpServer,
AssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder)
: base(serversInfo, httpServer, assetCache, false, libraryRootFolder) : base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
{ {

View File

@ -40,7 +40,7 @@ namespace OpenSim.Region.Communications.Hypergrid
public HGCommunicationsStandalone( public HGCommunicationsStandalone(
NetworkServersInfo serversInfo, NetworkServersInfo serversInfo,
BaseHttpServer httpServer, BaseHttpServer httpServer,
AssetCache assetCache, IAssetCache assetCache,
IUserService userService, IUserService userService,
IUserAdminService userServiceAdmin, IUserAdminService userServiceAdmin,
LocalInventoryService inventoryService, LocalInventoryService inventoryService,

View File

@ -83,7 +83,7 @@ namespace OpenSim.Region.Communications.Hypergrid
// This is key-ed on agent ID // This is key-ed on agent ID
protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>(); protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>();
protected AssetCache m_assetcache; protected IAssetCache m_assetcache;
protected UserProfileCacheService m_userProfileCache; protected UserProfileCacheService m_userProfileCache;
protected SceneManager m_sceneman; protected SceneManager m_sceneman;
@ -120,7 +120,7 @@ namespace OpenSim.Region.Communications.Hypergrid
/// </summary> /// </summary>
/// <param name="servers_info"></param> /// <param name="servers_info"></param>
/// <param name="httpServe"></param> /// <param name="httpServe"></param>
public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, AssetCache asscache, SceneManager sman) public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
{ {
serversInfo = servers_info; serversInfo = servers_info;
httpServer = httpServe; httpServer = httpServe;

View File

@ -71,7 +71,7 @@ namespace OpenSim.Region.Communications.Hypergrid
} }
public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe, public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe,
AssetCache asscache, SceneManager sman, UserProfileCacheService userv) IAssetCache asscache, SceneManager sman, UserProfileCacheService userv)
: base(servers_info, httpServe, asscache, sman) : base(servers_info, httpServe, asscache, sman)
{ {
m_remoteBackend = new OGS1GridServices(servers_info, httpServe); m_remoteBackend = new OGS1GridServices(servers_info, httpServe);

View File

@ -79,7 +79,7 @@ namespace OpenSim.Region.Communications.Hypergrid
} }
public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, AssetCache asscache, SceneManager sman) public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
: base(servers_info, httpServe, asscache, sman) : base(servers_info, httpServe, asscache, sman)
{ {
//Respond to Grid Services requests //Respond to Grid Services requests

View File

@ -37,7 +37,7 @@ namespace OpenSim.Region.Communications.Local
public CommunicationsLocal( public CommunicationsLocal(
NetworkServersInfo serversInfo, NetworkServersInfo serversInfo,
BaseHttpServer httpServer, BaseHttpServer httpServer,
AssetCache assetCache, IAssetCache assetCache,
IUserService userService, IUserService userService,
IUserAdminService userServiceAdmin, IUserAdminService userServiceAdmin,
LocalInventoryService inventoryService, LocalInventoryService inventoryService,

View File

@ -36,7 +36,7 @@ namespace OpenSim.Region.Communications.OGS1
{ {
public CommunicationsOGS1( public CommunicationsOGS1(
NetworkServersInfo serversInfo, BaseHttpServer httpServer, NetworkServersInfo serversInfo, BaseHttpServer httpServer,
AssetCache assetCache, LibraryRootFolder libraryRootFolder) IAssetCache assetCache, LibraryRootFolder libraryRootFolder)
: base(serversInfo, httpServer, assetCache, false, libraryRootFolder) : base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
{ {
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);

View File

@ -59,9 +59,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <summary> /// <summary>
/// Cache to which dearchived assets will be added /// Cache to which dearchived assets will be added
/// </summary> /// </summary>
protected AssetCache m_cache; protected IAssetCache m_cache;
public AssetsDearchiver(AssetCache cache) public AssetsDearchiver(IAssetCache cache)
{ {
m_cache = cache; m_cache = cache;
} }

View File

@ -73,9 +73,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
/// <summary> /// <summary>
/// Asset cache used to request the assets /// Asset cache used to request the assets
/// </summary> /// </summary>
protected AssetCache m_assetCache; protected IAssetCache m_assetCache;
protected internal AssetsRequest(ICollection<UUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) protected internal AssetsRequest(ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
{ {
m_uuids = uuids; m_uuids = uuids;
m_assetsRequestCallback = assetsRequestCallback; m_assetsRequestCallback = assetsRequestCallback;

View File

@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
public HGScene(RegionInfo regInfo, AgentCircuitManager authen, public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, IAssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,

View File

@ -272,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes
public Scene(RegionInfo regInfo, AgentCircuitManager authen, public Scene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, IAssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
{ {

View File

@ -126,9 +126,9 @@ namespace OpenSim.Region.Framework.Scenes
protected string m_datastore; protected string m_datastore;
private AssetCache m_assetCache; private IAssetCache m_assetCache;
public AssetCache AssetCache public IAssetCache AssetCache
{ {
get { return m_assetCache; } get { return m_assetCache; }
set { m_assetCache = value; } set { m_assetCache = value; }

View File

@ -251,7 +251,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ScheduleFullUpdate(); m_part.ScheduleFullUpdate();
return; return;
} }
AssetCache cache = m_part.ParentGroup.Scene.AssetCache; IAssetCache cache = m_part.ParentGroup.Scene.AssetCache;
cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset)
{ {

View File

@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common.Mock
public TestScene( public TestScene(
RegionInfo regInfo, AgentCircuitManager authen, RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, IAssetCache assetCach, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader,

View File

@ -74,7 +74,7 @@ namespace OpenSim.Tests.Common.Setup
SceneCommunicationService scs = new SceneCommunicationService(cm); SceneCommunicationService scs = new SceneCommunicationService(cm);
SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin()); SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin());
AssetCache ac = new AssetCache(assetService); IAssetCache ac = (IAssetCache) new AssetCache(assetService);
StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", "");
IConfigSource configSource = new IniConfigSource(); IConfigSource configSource = new IniConfigSource();