diff options
author | Homer Horwitz | 2008-11-15 17:52:00 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-11-15 17:52:00 +0000 |
commit | 21b69ac5158f8902a2abb1d240d2b8fe15f7f22b (patch) | |
tree | 6762c93cb099d74ea92c92a755d18d3d34d0ff5a /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Prevent NRE if you do a llSetStatus(STATUS_ROTATION...) on an object that isn... (diff) | |
download | opensim-SC-21b69ac5158f8902a2abb1d240d2b8fe15f7f22b.zip opensim-SC-21b69ac5158f8902a2abb1d240d2b8fe15f7f22b.tar.gz opensim-SC-21b69ac5158f8902a2abb1d240d2b8fe15f7f22b.tar.bz2 opensim-SC-21b69ac5158f8902a2abb1d240d2b8fe15f7f22b.tar.xz |
Mantis #2621: Thanks idb, for a patch that will persist regularily changed objects better.
Objects will be persisted now MinimumTimeBeforePersistenceConsidered seconds
after the last change, but latest MaximumTimeBeforePersistenceConsidered after
the first change (both are configurable in OpenSim.ini.example and are set to
60 and 600 as default).
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f606018..eb9d509 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -62,6 +62,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
62 | public SynchronizeSceneHandler SynchronizeScene = null; | 62 | public SynchronizeSceneHandler SynchronizeScene = null; |
63 | public int splitID = 0; | 63 | public int splitID = 0; |
64 | 64 | ||
65 | private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; | ||
66 | private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; | ||
67 | |||
65 | #region Fields | 68 | #region Fields |
66 | 69 | ||
67 | protected Timer m_restartWaitTimer = new Timer(); | 70 | protected Timer m_restartWaitTimer = new Timer(); |
@@ -171,6 +174,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
171 | 174 | ||
172 | private object m_deleting_scene_object = new object(); | 175 | private object m_deleting_scene_object = new object(); |
173 | 176 | ||
177 | // the minimum time that must elapse before a changed object will be considered for persisted | ||
178 | public long m_dontPersistBefore = DEFAULT_MIN_TIME_FOR_PERSISTENCE * 10000000L; | ||
179 | // the maximum time that must elapse before a changed object will be considered for persisted | ||
180 | public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L; | ||
181 | |||
174 | #endregion | 182 | #endregion |
175 | 183 | ||
176 | #region Properties | 184 | #region Properties |
@@ -335,6 +343,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
335 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f); | 343 | m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", 65536.0f); |
336 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f); | 344 | m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", 10.0f); |
337 | m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", false); | 345 | m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", false); |
346 | m_dontPersistBefore = | ||
347 | startupConfig.GetInt("MinimumTimeBeforePersistenceConsidered", DEFAULT_MIN_TIME_FOR_PERSISTENCE); | ||
348 | m_dontPersistBefore *= 10000000; | ||
349 | m_persistAfter = | ||
350 | startupConfig.GetInt("MaximumTimeBeforePersistenceConsidered", DEFAULT_MAX_TIME_FOR_PERSISTENCE); | ||
351 | m_persistAfter *= 10000000; | ||
338 | 352 | ||
339 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); | 353 | m_defaultScriptEngine = startupConfig.GetString("DefaultScriptEngine", "DotNetEngine"); |
340 | } | 354 | } |
@@ -348,6 +362,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
348 | 362 | ||
349 | #region Startup / Close Methods | 363 | #region Startup / Close Methods |
350 | 364 | ||
365 | public bool ShuttingDown | ||
366 | { | ||
367 | get { return shuttingdown; } | ||
368 | } | ||
369 | |||
351 | protected virtual void RegisterDefaultSceneEvents() | 370 | protected virtual void RegisterDefaultSceneEvents() |
352 | { | 371 | { |
353 | m_eventManager.OnPermissionError += SendPermissionAlert; | 372 | m_eventManager.OnPermissionError += SendPermissionAlert; |