proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Window.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-present, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
*/
10
#pragma once
11
12
#include <cstdint>
13
14
namespace
proxygen
{
15
20
class
Window
{
21
public
:
27
explicit
Window
(
uint32_t
capacity);
28
34
int32_t
getSize
()
const
;
35
41
uint32_t
getNonNegativeSize
()
const
;
42
47
uint32_t
getCapacity
()
const
;
48
54
uint32_t
getOutstanding
()
const
;
55
64
bool
reserve
(
uint32_t
amount,
bool
strict =
true
);
65
70
bool
free
(
uint32_t
amount);
71
77
bool
setCapacity
(
uint32_t
capacity);
78
79
private
:
80
int32_t
outstanding_
{0};
81
int32_t
capacity_
{0};
// always positive
82
};
83
84
}
proxygen::Window::outstanding_
int32_t outstanding_
Definition:
Window.h:80
proxygen::Window::getCapacity
uint32_t getCapacity() const
Definition:
Window.cpp:32
int32_t
int32_t
Definition:
ConstexprMathBenchmark.cpp:184
proxygen::Window::getOutstanding
uint32_t getOutstanding() const
Definition:
Window.cpp:37
proxygen::Window::getSize
int32_t getSize() const
Definition:
Window.cpp:23
proxygen::Window::reserve
bool reserve(uint32_t amount, bool strict=true)
Definition:
Window.cpp:41
proxygen::Window
Definition:
Window.h:20
proxygen::Window::Window
Window(uint32_t capacity)
Definition:
Window.cpp:19
proxygen::Window::setCapacity
bool setCapacity(uint32_t capacity)
Definition:
Window.cpp:84
proxygen
Definition:
ExMessageHandler.h:14
uint32_t
uint32_t
Definition:
ConstexprMathBenchmark.cpp:186
proxygen::Window::capacity_
int32_t capacity_
Definition:
Window.h:81
proxygen::Window::free
bool free(uint32_t amount)
Definition:
Window.cpp:63
proxygen::Window::getNonNegativeSize
uint32_t getNonNegativeSize() const
Definition:
Window.cpp:27
proxygen
lib
http
Window.h
Generated by
1.8.11