hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::cache::SinglePointerCache< DataType > Class Template Reference

#include "single_pointer_cache.hpp"

Collaboration diagram for iroha::cache::SinglePointerCache< DataType >:
Collaboration graph

Public Types

using DataPointer = std::shared_ptr< std::decay_t< DataType >>
 

Public Member Functions

void insert (DataPointer data)
 
DataPointer get () const
 
void release ()
 

Detailed Description

template<typename DataType>
class iroha::cache::SinglePointerCache< DataType >

Thread-safely stores and returns shared pointer to an element of template type

Member Typedef Documentation

template<typename DataType>
using iroha::cache::SinglePointerCache< DataType >::DataPointer = std::shared_ptr<std::decay_t<DataType>>

Pointer to data type

Member Function Documentation

template<typename DataType >
SinglePointerCache< DataType >::DataPointer iroha::cache::SinglePointerCache< DataType >::get ( ) const

Get data from the cache

Returns
pointer to the stored data
template<typename DataType >
void iroha::cache::SinglePointerCache< DataType >::insert ( SinglePointerCache< DataType >::DataPointer  data)

Insert data to the cache

Parameters
pointerto the data to be inserted
template<typename DataType >
void iroha::cache::SinglePointerCache< DataType >::release ( )

Delete data inside the cache


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