#include <XrdPfcStableChunkVector.hh>
Public Member Functions | |
| int | acquire () |
| std::size_t | n_free () const |
| std::size_t | n_in_use () const |
| void | release (int i) |
| Clear the slot and return it for reuse. Caller must hold its mutex. | |
| Public Member Functions inherited from XrdPfc::StableChunkVector< T, 12, 1024 > | |
| StableChunkVector () | |
| int | add () |
| Append a default-constructed T; return its index, or -1 if full. | |
| std::size_t | capacity () const |
| bool | full () const |
| T & | operator[] (std::size_t i) |
| std::size_t | size () const |
Additional Inherited Members | |
| Static Public Attributes inherited from XrdPfc::StableChunkVector< T, 12, 1024 > | |
| static constexpr std::size_t | s_capacity |
| static constexpr std::size_t | s_chunk_mask |
| static constexpr std::size_t | s_chunk_size |
StableChunkVector with slot recycling. Not thread-safe: acquire() and release() must run under the mutex that also publishes the index. release() clears the slot, so acquire() always returns a cleared one. Requires T::clear().
Definition at line 71 of file XrdPfcStableChunkVector.hh.
|
inline |
Index of a recycled or freshly appended slot, cleared and ready for use, or -1 if capacity is exhausted. Caller must hold its mutex.
Definition at line 78 of file XrdPfcStableChunkVector.hh.
References XrdPfc::StableChunkVector< T, InnerShift, MaxChunks >::add().
|
inline |
Definition at line 96 of file XrdPfcStableChunkVector.hh.
|
inline |
Definition at line 97 of file XrdPfcStableChunkVector.hh.
References XrdPfc::StableChunkVector< T, InnerShift, MaxChunks >::size().
|
inline |
Clear the slot and return it for reuse. Caller must hold its mutex.
Definition at line 90 of file XrdPfcStableChunkVector.hh.