From f34cc6b46949033803c79235b9d82da9bf9634dd Mon Sep 17 00:00:00 2001
From: Thomas Grimshaw
Date: Mon, 5 Apr 2010 22:08:34 +0200
Subject: Add a much cheaper agent count retrieval method. This is obsoleted
by 0.7 so it can be reverted then.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ab0d397..e5e6fc9 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1523,7 +1523,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SaveTerrain()
{
m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID);
- }
+ }
public void StoreWindlightProfile(RegionMeta7WindlightData wl)
{
@@ -4339,6 +4339,14 @@ namespace OpenSim.Region.Framework.Scenes
}
///
+ /// Cheaply return the number of avatars in a region (without fetching a list object)
+ ///
+ public int GetRootAgentCount()
+ {
+ return m_sceneGraph.GetRootAgentCount();
+ }
+
+ ///
/// Return a list of all ScenePresences in this region. This returns child agents as well as root agents.
/// This list is a new object, so it can be iterated over without locking.
///
--
cgit v1.1
From 7701ea27983be851a3c9d3954346018e07680ae6 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 9 Apr 2010 06:49:14 +0100
Subject: Add Scene.SnmpService, which is of type ISnmpModule and, if nun-null,
can be used to send snmp alerts
---
OpenSim/Region/Framework/Scenes/Scene.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 55f4550..db073e8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -158,6 +158,20 @@ namespace OpenSim.Region.Framework.Scenes
public IXfer XferManager;
+ protected ISnmpModule m_snmpService = null;
+ public ISnmpModule SnmpService
+ {
+ get
+ {
+ if (m_snmpService == null)
+ {
+ m_snmpService = RequestModuleInterface();
+ }
+
+ return m_snmpService;
+ }
+ }
+
protected IAssetService m_AssetService;
protected IAuthorizationService m_AuthorizationService;
--
cgit v1.1