protected override bool CanWeProcessServiceObjectHandler(IServer server, object obj) { IResourceRequest[] replicates = MultiRequestProcessor.Replicate(ref m_requestTemplates); bool success = MultiRequestProcessor.ReserveAll(ref replicates, m_useBlockingCalls); if (success) { m_resourcesInUse.Add(obj, replicates); } return(success); }
protected override void PreCompletionTeardownHandler(IServer server, object obj) { IResourceRequest[] replicates = (IResourceRequest[])m_resourcesInUse[obj]; MultiRequestProcessor.ReleaseAll(ref replicates); m_resourcesInUse.Remove(obj); }
protected override void PreCommencementSetupHandler(IServer server, object obj) { IResourceRequest[] replicates = (IResourceRequest[])m_resourcesInUse[obj]; MultiRequestProcessor.AcquireAll(ref replicates, m_useBlockingCalls); }