From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- OpenSim/Framework/Cache.cs | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'OpenSim/Framework/Cache.cs') diff --git a/OpenSim/Framework/Cache.cs b/OpenSim/Framework/Cache.cs index 427072d..261e0f9 100644 --- a/OpenSim/Framework/Cache.cs +++ b/OpenSim/Framework/Cache.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; -using libsecondlife; +using OpenMetaverse; namespace Opensim.Framework { // The delegate we will use for performing fetch from backing store // - public delegate Object FetchDelegate(LLUUID index); - public delegate bool ExpireDelegate(LLUUID index); + public delegate Object FetchDelegate(UUID index); + public delegate bool ExpireDelegate(UUID index); // Strategy // @@ -37,14 +37,14 @@ namespace Opensim.Framework } // The base class of all cache objects. Implements comparison and sorting - // by the LLUUID member. + // by the UUID member. // // This is not abstract because we need to instantiate it briefly as a // method parameter // public class CacheItemBase : IEquatable, IComparable { - public LLUUID uuid; + public UUID uuid; public DateTime entered; public DateTime lastUsed; public DateTime expires = new DateTime(0); @@ -59,14 +59,14 @@ namespace Opensim.Framework { } - public CacheItemBase(LLUUID index) + public CacheItemBase(UUID index) { uuid = index; entered = DateTime.Now; lastUsed = entered; } - public CacheItemBase(LLUUID index, DateTime ttl) + public CacheItemBase(UUID index, DateTime ttl) { uuid = index; entered = DateTime.Now; @@ -96,23 +96,23 @@ namespace Opensim.Framework { private Object m_Data; - public MemoryCacheItem(LLUUID index) : + public MemoryCacheItem(UUID index) : base(index) { } - public MemoryCacheItem(LLUUID index, DateTime ttl) : + public MemoryCacheItem(UUID index, DateTime ttl) : base(index, ttl) { } - public MemoryCacheItem(LLUUID index, Object data) : + public MemoryCacheItem(UUID index, Object data) : base(index) { Store(data); } - public MemoryCacheItem(LLUUID index, DateTime ttl, Object data) : + public MemoryCacheItem(UUID index, DateTime ttl, Object data) : base(index, ttl) { Store(data); @@ -133,23 +133,23 @@ namespace Opensim.Framework // public class FileCacheItem : CacheItemBase { - public FileCacheItem(LLUUID index) : + public FileCacheItem(UUID index) : base(index) { } - public FileCacheItem(LLUUID index, DateTime ttl) : + public FileCacheItem(UUID index, DateTime ttl) : base(index, ttl) { } - public FileCacheItem(LLUUID index, Object data) : + public FileCacheItem(UUID index, Object data) : base(index) { Store(data); } - public FileCacheItem(LLUUID index, DateTime ttl, Object data) : + public FileCacheItem(UUID index, DateTime ttl, Object data) : base(index, ttl) { Store(data); @@ -173,8 +173,8 @@ namespace Opensim.Framework public class Cache { private List m_Index = new List(); - private Dictionary m_Lookup = - new Dictionary(); + private Dictionary m_Lookup = + new Dictionary(); private CacheStrategy m_Strategy; private CacheMedium m_Medium; @@ -285,7 +285,7 @@ namespace Opensim.Framework // Get an item from cache. Return the raw item, not it's data // - protected virtual CacheItemBase GetItem(LLUUID index) + protected virtual CacheItemBase GetItem(UUID index) { CacheItemBase item = null; @@ -312,7 +312,7 @@ namespace Opensim.Framework // Get an item from cache. Do not try to fetch from source if not // present. Just return null // - public virtual Object Get(LLUUID index) + public virtual Object Get(UUID index) { CacheItemBase item = GetItem(index); @@ -325,7 +325,7 @@ namespace Opensim.Framework // Fetch an object from backing store if not cached, serve from // cache if it is. // - public virtual Object Get(LLUUID index, FetchDelegate fetch) + public virtual Object Get(UUID index, FetchDelegate fetch) { Object item = Get(index); if (item != null) @@ -366,7 +366,7 @@ namespace Opensim.Framework return item.Retrieve(); } - public virtual void Store(LLUUID index, Object data) + public virtual void Store(UUID index, Object data) { Type container; @@ -384,12 +384,12 @@ namespace Opensim.Framework Store(index, data, container); } - public virtual void Store(LLUUID index, Object data, Type container) + public virtual void Store(UUID index, Object data, Type container) { Store(index, data, container, new Object[] { index }); } - public virtual void Store(LLUUID index, Object data, Type container, + public virtual void Store(UUID index, Object data, Type container, Object[] parameters) { Expire(false); @@ -493,7 +493,7 @@ namespace Opensim.Framework } } - public void Invalidate(LLUUID uuid) + public void Invalidate(UUID uuid) { if (!m_Lookup.ContainsKey(uuid)) return; -- cgit v1.1