diff options
author | Diva Canto | 2015-05-08 20:53:28 -0700 |
---|---|---|
committer | Diva Canto | 2015-05-08 20:53:28 -0700 |
commit | 0bf1209f908bb9a384ddb3a4255a75bf2317c478 (patch) | |
tree | 3ebc80806ecfe884352f6628132421d2edcdab04 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory | |
parent | Restore handling of bad folders. I'm not entirely sure this is part of the pr... (diff) | |
download | opensim-SC_OLD-0bf1209f908bb9a384ddb3a4255a75bf2317c478.zip opensim-SC_OLD-0bf1209f908bb9a384ddb3a4255a75bf2317c478.tar.gz opensim-SC_OLD-0bf1209f908bb9a384ddb3a4255a75bf2317c478.tar.bz2 opensim-SC_OLD-0bf1209f908bb9a384ddb3a4255a75bf2317c478.tar.xz |
Another major overhaul of inventory downloading, this time pertaining to inventory links. Added yet another function to IInventoryService to get multiple items at once, so that fetching collections of linked items is done once per folder instead of once per item.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory')
3 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 232cfdf..6a83b42 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -615,6 +615,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
615 | return connector.GetItem(item); | 615 | return connector.GetItem(item); |
616 | } | 616 | } |
617 | 617 | ||
618 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) | ||
619 | { | ||
620 | if (itemIDs == null) | ||
621 | return new InventoryItemBase[0]; | ||
622 | //m_log.Debug("[HG INVENTORY CONNECTOR]: GetItem " + item.ID); | ||
623 | |||
624 | string invURL = GetInventoryServiceURL(userID); | ||
625 | |||
626 | if (invURL == null) // not there, forward to local inventory connector to resolve | ||
627 | lock (m_Lock) | ||
628 | return m_LocalGridInventoryService.GetMultipleItems(userID, itemIDs); | ||
629 | |||
630 | IInventoryService connector = GetConnector(invURL); | ||
631 | |||
632 | return connector.GetMultipleItems(userID, itemIDs); | ||
633 | } | ||
634 | |||
618 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 635 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) |
619 | { | 636 | { |
620 | if (folder == null) | 637 | if (folder == null) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index 75dd200..2f29a7c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -307,6 +307,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
307 | return item; | 307 | return item; |
308 | } | 308 | } |
309 | 309 | ||
310 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) | ||
311 | { | ||
312 | return m_InventoryService.GetMultipleItems(userID, itemIDs); | ||
313 | } | ||
314 | |||
310 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 315 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) |
311 | { | 316 | { |
312 | return m_InventoryService.GetFolder(folder); | 317 | return m_InventoryService.GetFolder(folder); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 9beb382..e0cc1e8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -303,6 +303,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
303 | return m_RemoteConnector.GetItem(item); | 303 | return m_RemoteConnector.GetItem(item); |
304 | } | 304 | } |
305 | 305 | ||
306 | public InventoryItemBase[] GetMultipleItems(UUID userID, UUID[] itemIDs) | ||
307 | { | ||
308 | if (itemIDs == null) | ||
309 | return new InventoryItemBase[0]; | ||
310 | |||
311 | return m_RemoteConnector.GetMultipleItems(userID, itemIDs); | ||
312 | } | ||
313 | |||
306 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) | 314 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) |
307 | { | 315 | { |
308 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); | 316 | //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); |