Beispiel #1
0
        public GridRegion Get(UUID scopeID, UUID regionID, out bool inCache)
        {
            inCache = false;

            GridRegion       rinfo = null;
            ScopedRegionUUID id    = new ScopedRegionUUID(scopeID, regionID);

            if (m_UUIDCache.TryGetValue(id, out rinfo))
            {
                inCache = true;
                return(rinfo);
            }

            return(null);
        }
Beispiel #2
0
        public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo)
        {
            // for now, do not cache negative results; this is because
            // we need to figure out how to handle regions coming online
            // in a timely way
            if (rinfo == null)
            {
                return;
            }

            ScopedRegionUUID id = new ScopedRegionUUID(scopeID, regionID);

            // Cache even null accounts
            m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS);
            if (rinfo != null)
            {
                ScopedRegionName name = new ScopedRegionName(scopeID, rinfo.RegionName);
                m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS);
            }
        }
 public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo)
 {
     // for now, do not cache negative results; this is because
     // we need to figure out how to handle regions coming online
     // in a timely way
     if (rinfo == null)
         return;
     
     ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID);
     
     // Cache even null accounts
     m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS);
     if (rinfo != null)
     {
         ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName);
         m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS);
         ScopedRegionHandle hnd = new ScopedRegionHandle(scopeID, rinfo.RegionHandle);
         m_HandleCache.AddOrUpdate(hnd,id,CACHE_EXPIRATION_SECONDS);
     }
 }
        public GridRegion Get(UUID scopeID, UUID regionID, out bool inCache)
        {
            inCache = false;

            GridRegion rinfo = null;
            ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID);
            if (m_UUIDCache.TryGetValue(id, out rinfo))
            {
                inCache = true;
                return rinfo;
            }

            return null;
        }