AWS SDK for C++  0.14.3
AWS SDK for C++
ResourceManagerInterface.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License").
6  * You may not use this file except in compliance with the License.
7  * A copy of the License is located at
8  *
9  * http://aws.amazon.com/apache2.0
10  *
11  * or in the "license" file accompanying this file. This file is distributed
12  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied. See the License for the specific language governing
14  * permissions and limitations under the License.
15  */
16 
17 #pragma once
18 
20 
22 
23 namespace Aws
24 {
25 namespace Transfer
26 {
27 
28 template< typename T >
30 {
31  public:
32 
34 
36 
37  // Waits for at least one buffer, possibly all depending on acquisition policy
38  virtual void AcquireResources(uint32_t resourceCount, ResourceListType& acquiredResources) = 0;
39 
40  // Blocks on overall mutex only; if after lock, no available buffers, it just returns
41  virtual void TryAcquireResources(uint32_t resourceCount, ResourceListType& acquiredResources) = 0;
42 
43  virtual void ReleaseResources(ResourceListType& acquiredResources) = 0;
44 
45  virtual void AdjustResourceCount(uint32_t m_resourceCount) = 0;
46 
47 };
48 
49 } // namespace Transfer
50 } // namespace Aws
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
virtual void ReleaseResources(ResourceListType &acquiredResources)=0
virtual void AdjustResourceCount(uint32_t m_resourceCount)=0
virtual void AcquireResources(uint32_t resourceCount, ResourceListType &acquiredResources)=0
virtual void TryAcquireResources(uint32_t resourceCount, ResourceListType &acquiredResources)=0
JSON (JavaScript Object Notation).