diff options
author | Justin Clark-Casey (justincc) | 2010-09-06 23:00:24 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-09-06 23:00:24 +0100 |
commit | 953b7f491798e97b7b36808e716975b22d80114b (patch) | |
tree | ca42d90b890b05457b6a9fd736929382911c85cd /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Reflect the ParcelPropertiesUpdateRequest into Scene.EventManager, because (diff) | |
download | opensim-SC-953b7f491798e97b7b36808e716975b22d80114b.zip opensim-SC-953b7f491798e97b7b36808e716975b22d80114b.tar.gz opensim-SC-953b7f491798e97b7b36808e716975b22d80114b.tar.bz2 opensim-SC-953b7f491798e97b7b36808e716975b22d80114b.tar.xz |
Add test to check persistence of newly added pre-linked objects
Added a MockRegionDataPlugin to do in-memory persistence for tests since adding this to OpenSim.Data.Null.NullDataStore doesn't seem appropriate
NullDataStore can do nothing because OpenSim only ever retrieve region objects from the database on startup. Adding an in-memory store here would be unecessary overhead.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 49f29ad..93882ba 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1531,15 +1531,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1531 | Backup(); | 1531 | Backup(); |
1532 | } | 1532 | } |
1533 | 1533 | ||
1534 | public void Backup() | ||
1535 | { | ||
1536 | Backup(false); | ||
1537 | } | ||
1538 | |||
1534 | /// <summary> | 1539 | /// <summary> |
1535 | /// Backup the scene. This acts as the main method of the backup thread. | 1540 | /// Backup the scene. This acts as the main method of the backup thread. |
1536 | /// </summary> | 1541 | /// </summary> |
1542 | /// <param name="forced"> | ||
1543 | /// If true, then any changes that have not yet been persisted are persisted. If false, | ||
1544 | /// then the persistence decision is left to the backup code (in some situations, such as object persistence, | ||
1545 | /// it's much more efficient to backup multiple changes at once rather than every single one). | ||
1537 | /// <returns></returns> | 1546 | /// <returns></returns> |
1538 | public void Backup() | 1547 | public void Backup(bool forced) |
1539 | { | 1548 | { |
1540 | lock (m_returns) | 1549 | lock (m_returns) |
1541 | { | 1550 | { |
1542 | EventManager.TriggerOnBackup(m_storageManager.DataStore); | 1551 | EventManager.TriggerOnBackup(m_storageManager.DataStore, forced); |
1543 | m_backingup = false; | 1552 | m_backingup = false; |
1544 | 1553 | ||
1545 | foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns) | 1554 | foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns) |