diff options
author | Justin Clark-Casey (justincc) | 2015-01-08 20:21:40 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2015-01-08 20:21:40 +0000 |
commit | 08606ae409b400b6f9b83006ed04826eede8a9c7 (patch) | |
tree | b11e1ebfa99dfda28aa3df22041c6e3d167491ce /OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |
parent | Commented out clear_registry_ because (1) it isn't clearing up anything anymo... (diff) | |
download | opensim-SC-08606ae409b400b6f9b83006ed04826eede8a9c7.zip opensim-SC-08606ae409b400b6f9b83006ed04826eede8a9c7.tar.gz opensim-SC-08606ae409b400b6f9b83006ed04826eede8a9c7.tar.bz2 opensim-SC-08606ae409b400b6f9b83006ed04826eede8a9c7.tar.xz |
Make the IteratingUuidGatherer the only UuidGatherer.
This UUID gatherer provides a superset of the previous gatherer's functionality
as it also allows the caller to control gathering iterations for load purposes.
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 59b30a9..7d9c9a9 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -776,7 +776,6 @@ namespace OpenSim.Region.CoreModules.Asset | |||
776 | { | 776 | { |
777 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); | 777 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); |
778 | 778 | ||
779 | Dictionary<UUID, sbyte> assetIdsToCheck = new Dictionary<UUID, sbyte>(); | ||
780 | Dictionary<UUID, bool> assetsFound = new Dictionary<UUID, bool>(); | 779 | Dictionary<UUID, bool> assetsFound = new Dictionary<UUID, bool>(); |
781 | 780 | ||
782 | foreach (Scene s in m_Scenes) | 781 | foreach (Scene s in m_Scenes) |
@@ -784,10 +783,11 @@ namespace OpenSim.Region.CoreModules.Asset | |||
784 | StampRegionStatusFile(s.RegionInfo.RegionID); | 783 | StampRegionStatusFile(s.RegionInfo.RegionID); |
785 | 784 | ||
786 | s.ForEachSOG(delegate(SceneObjectGroup e) | 785 | s.ForEachSOG(delegate(SceneObjectGroup e) |
787 | { | 786 | { |
788 | gatherer.GatherAssetUuids(e, assetIdsToCheck); | 787 | gatherer.AddForInspection(e); |
788 | gatherer.GatherAll(); | ||
789 | 789 | ||
790 | foreach (UUID assetID in assetIdsToCheck.Keys) | 790 | foreach (UUID assetID in gatherer.GatheredUuids.Keys) |
791 | { | 791 | { |
792 | if (!assetsFound.ContainsKey(assetID)) | 792 | if (!assetsFound.ContainsKey(assetID)) |
793 | { | 793 | { |
@@ -800,7 +800,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
800 | else if (storeUncached) | 800 | else if (storeUncached) |
801 | { | 801 | { |
802 | AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); | 802 | AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); |
803 | if (cachedAsset == null && assetIdsToCheck[assetID] != (sbyte)AssetType.Unknown) | 803 | if (cachedAsset == null && gatherer.GatheredUuids[assetID] != (sbyte)AssetType.Unknown) |
804 | assetsFound[assetID] = false; | 804 | assetsFound[assetID] = false; |
805 | else | 805 | else |
806 | assetsFound[assetID] = true; | 806 | assetsFound[assetID] = true; |
@@ -810,11 +810,11 @@ namespace OpenSim.Region.CoreModules.Asset | |||
810 | { | 810 | { |
811 | m_log.DebugFormat( | 811 | m_log.DebugFormat( |
812 | "[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets", | 812 | "[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets", |
813 | assetID, assetIdsToCheck[assetID], e.Name, e.AbsolutePosition, s.Name); | 813 | assetID, gatherer.GatheredUuids[assetID], e.Name, e.AbsolutePosition, s.Name); |
814 | } | 814 | } |
815 | } | 815 | } |
816 | 816 | ||
817 | assetIdsToCheck.Clear(); | 817 | gatherer.GatheredUuids.Clear(); |
818 | }); | 818 | }); |
819 | } | 819 | } |
820 | 820 | ||