Loading...
Searching...
No Matches
Ef_OutputValueCache::ExclusiveAccess Class Reference

An accessor that provides exclusive read/write access to the cache. More...

#include <outputValueCache.h>

Public Member Functions

 ExclusiveAccess (const ExclusiveAccess &)=delete
 Non-copyable.
 
const ExclusiveAccessoperator= (const ExclusiveAccess &)=delete
 
 ExclusiveAccess (Ef_OutputValueCache *cache)
 Constructor.
 
bool IsEmpty () const
 Returns true if the cache is empty at this time.
 
bool IsUncached (const VdfRequest &request) const
 Returns true if any outputs in the request are not currently cached.
 
VdfRequest GetUncached (const VdfRequest &request) const
 Returns a request of outputs that are not currently cached.
 
const VdfVectorGetValue (const VdfOutput &output, const VdfMask &mask) const
 Returns the cached value for a given output and mask, if it exists.
 
size_t SetValue (const VdfOutput &output, const VdfVector &value, const VdfMask &mask)
 Sets the cached values for a given output and mask.
 
size_t Invalidate (const VdfOutput &output)
 Invalidate an output by removing all the data stored at the output.
 
size_t Invalidate (const VdfMaskedOutputVector &outputs)
 Invalidate a vector of outputs and masks by removing the data from the cache.
 
size_t Clear ()
 Clears the entire cache.
 

Detailed Description

An accessor that provides exclusive read/write access to the cache.

No other reader or writer will access this cache.

Definition at line 54 of file outputValueCache.h.

Constructor & Destructor Documentation

◆ ExclusiveAccess() [1/2]

ExclusiveAccess ( const ExclusiveAccess )
delete

Non-copyable.

◆ ExclusiveAccess() [2/2]

ExclusiveAccess ( Ef_OutputValueCache cache)
inline

Constructor.

Definition at line 64 of file outputValueCache.h.

Member Function Documentation

◆ Clear()

size_t Clear ( )
inline

Clears the entire cache.

Returns the number of bytes that have been removed from the cache.

Definition at line 131 of file outputValueCache.h.

◆ GetUncached()

VdfRequest GetUncached ( const VdfRequest &  request) const
inline

Returns a request of outputs that are not currently cached.

Definition at line 85 of file outputValueCache.h.

◆ GetValue()

const VdfVector * GetValue ( const VdfOutput output,
const VdfMask mask 
) const
inline

Returns the cached value for a given output and mask, if it exists.

Definition at line 93 of file outputValueCache.h.

◆ Invalidate() [1/2]

size_t Invalidate ( const VdfMaskedOutputVector &  outputs)
inline

Invalidate a vector of outputs and masks by removing the data from the cache.

Returns the number of bytes invalidated.

Definition at line 124 of file outputValueCache.h.

◆ Invalidate() [2/2]

size_t Invalidate ( const VdfOutput output)
inline

Invalidate an output by removing all the data stored at the output.

Returns the number of bytes invalidated.

Definition at line 116 of file outputValueCache.h.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Returns true if the cache is empty at this time.

Definition at line 71 of file outputValueCache.h.

◆ IsUncached()

bool IsUncached ( const VdfRequest &  request) const
inline

Returns true if any outputs in the request are not currently cached.

Definition at line 78 of file outputValueCache.h.

◆ SetValue()

size_t SetValue ( const VdfOutput output,
const VdfVector value,
const VdfMask mask 
)
inline

Sets the cached values for a given output and mask.

Returns the number of bytes of additionally allocated storage.

This will NOT update elements in the vector, which are already cached. Only uncached data will be merged into values existing in the cache.

Definition at line 106 of file outputValueCache.h.


The documentation for this class was generated from the following file: