コード例 #1
0
        /// <summary>
        ///     Return the xfer uploader for the given transaction.
        /// </summary>
        /// <remarks>
        ///     If an uploader does not already exist for this transaction then it is created, otherwise the existing
        ///     uploader is returned.
        /// </remarks>
        /// <param name="transactionID"></param>
        /// <returns>The asset xfer uploader</returns>
        public AssetXferUploader RequestXferUploader(UUID transactionID)
        {
            AssetXferUploader uploader;

            lock (XferUploaders)
            {
                if (!XferUploaders.ContainsKey(transactionID))
                {
                    uploader = new AssetXferUploader(this, m_Scene, transactionID, m_dumpAssetsToFile);

                    //                    MainConsole.Instance.DebugFormat(
                    //                        "[AGENT ASSETS TRANSACTIONS]: Adding asset xfer uploader {0} since it didn't previously exist", transactionID);

                    XferUploaders.Add(transactionID, uploader);
                }
                else
                {
                    uploader = XferUploaders[transactionID];
                }
            }

            IMonitorModule monitorModule = m_Scene.RequestModuleInterface<IMonitorModule>();
            if (monitorModule != null)
            {
                INetworkMonitor networkMonitor = monitorModule.GetMonitor<INetworkMonitor>();
                networkMonitor.AddPendingUploads(1);
            }

            return uploader;
        }
コード例 #2
0
        public AssetXferUploader RequestXferUploader(UUID transactionID)
        {
            if (!XferUploaders.ContainsKey(transactionID))
            {
                AssetXferUploader uploader = new AssetXferUploader(this);

                lock (XferUploaders)
                {
                    XferUploaders.Add(transactionID, uploader);
                }

                return uploader;
            }
            return null;
        }
コード例 #3
0
        /// <summary>
        /// Return the xfer uploader for the given transaction.
        /// </summary>
        /// <remarks>
        /// If an uploader does not already exist for this transaction then it is created, otherwise the existing
        /// uploader is returned.
        /// </remarks>
        /// <param name="transactionID"></param>
        /// <returns>The asset xfer uploader</returns>
        public AssetXferUploader RequestXferUploader(UUID transactionID)
        {
            AssetXferUploader uploader;

            lock (XferUploaders)
            {
                if (!XferUploaders.ContainsKey(transactionID))
                {
                    uploader = new AssetXferUploader(this, m_Scene, transactionID, m_dumpAssetsToFile);

                    //                    m_log.DebugFormat(
                    //                        "[AGENT ASSETS TRANSACTIONS]: Adding asset xfer uploader {0} since it didn't previously exist", transactionID);

                    XferUploaders.Add(transactionID, uploader);
                }
                else
                {
                    uploader = XferUploaders[transactionID];
                }
            }

            return uploader;
        }