Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_binder::end2end_testing::TransactionProcessor Class Reference

#include <fake_binder.h>

Public Member Functions

void EnQueueTransaction (FakeEndpoint *target, BinderTransportTxCode tx_code, FakeData data)
 
void Flush ()
 
PersistentFakeTransactionReceiverNewPersistentTxReceiver (grpc_core::RefCountedPtr< WireReader > wire_reader_ref, TransactionReceiver::OnTransactCb cb, std::unique_ptr< FakeBinderTunnel > tunnel)
 
void ProcessLoop ()
 
void SetDelay (absl::Duration delay)
 
void Terminate ()
 
 TransactionProcessor (absl::Duration delay=absl::ZeroDuration())
 
 ~TransactionProcessor ()
 

Private Member Functions

std::queue< std::tuple< FakeEndpoint *, BinderTransportTxCode, FakeData > > tx_queue_ ABSL_GUARDED_BY (mu_)
 
absl::Time deliver_time_ ABSL_GUARDED_BY (mu_)
 
std::forward_list< PersistentFakeTransactionReceiver > storage_ ABSL_GUARDED_BY (tx_receiver_mu_)
 
absl::Duration GetRandomDelay ()
 
void WaitForNextTransaction () ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
 

Private Attributes

absl::BitGen bit_gen_
 
int64_t delay_nsec_
 
grpc_core::Mutex mu_
 
std::atomic< boolterminated_
 
grpc_core::Mutex tx_receiver_mu_
 
grpc_core::Thread tx_thread_
 

Detailed Description

Definition at line 230 of file fake_binder.h.

Constructor & Destructor Documentation

◆ TransactionProcessor()

grpc_binder::end2end_testing::TransactionProcessor::TransactionProcessor ( absl::Duration  delay = absl::ZeroDuration())
explicit

Definition at line 154 of file fake_binder.cc.

◆ ~TransactionProcessor()

grpc_binder::end2end_testing::TransactionProcessor::~TransactionProcessor ( )
inline

Definition at line 233 of file fake_binder.h.

Member Function Documentation

◆ ABSL_GUARDED_BY() [1/3]

std::queue<std::tuple<FakeEndpoint*, BinderTransportTxCode, FakeData> > tx_queue_ grpc_binder::end2end_testing::TransactionProcessor::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [2/3]

absl::Time deliver_time_ grpc_binder::end2end_testing::TransactionProcessor::ABSL_GUARDED_BY ( mu_  )
private

◆ ABSL_GUARDED_BY() [3/3]

std::forward_list<PersistentFakeTransactionReceiver> storage_ grpc_binder::end2end_testing::TransactionProcessor::ABSL_GUARDED_BY ( tx_receiver_mu_  )
private

◆ EnQueueTransaction()

void grpc_binder::end2end_testing::TransactionProcessor::EnQueueTransaction ( FakeEndpoint target,
BinderTransportTxCode  tx_code,
FakeData  data 
)

Definition at line 248 of file fake_binder.cc.

◆ Flush()

void grpc_binder::end2end_testing::TransactionProcessor::Flush ( )

Definition at line 192 of file fake_binder.cc.

◆ GetRandomDelay()

absl::Duration grpc_binder::end2end_testing::TransactionProcessor::GetRandomDelay ( )
private

Definition at line 242 of file fake_binder.cc.

◆ NewPersistentTxReceiver()

PersistentFakeTransactionReceiver& grpc_binder::end2end_testing::TransactionProcessor::NewPersistentTxReceiver ( grpc_core::RefCountedPtr< WireReader wire_reader_ref,
TransactionReceiver::OnTransactCb  cb,
std::unique_ptr< FakeBinderTunnel tunnel 
)
inline

Definition at line 247 of file fake_binder.h.

◆ ProcessLoop()

void grpc_binder::end2end_testing::TransactionProcessor::ProcessLoop ( )

Definition at line 216 of file fake_binder.cc.

◆ SetDelay()

void grpc_binder::end2end_testing::TransactionProcessor::SetDelay ( absl::Duration  delay)

Definition at line 168 of file fake_binder.cc.

◆ Terminate()

void grpc_binder::end2end_testing::TransactionProcessor::Terminate ( )

Definition at line 172 of file fake_binder.cc.

◆ WaitForNextTransaction()

void grpc_binder::end2end_testing::TransactionProcessor::WaitForNextTransaction ( )
private

Definition at line 181 of file fake_binder.cc.

Member Data Documentation

◆ bit_gen_

absl::BitGen grpc_binder::end2end_testing::TransactionProcessor::bit_gen_
private

Definition at line 265 of file fake_binder.h.

◆ delay_nsec_

int64_t grpc_binder::end2end_testing::TransactionProcessor::delay_nsec_
private

Definition at line 264 of file fake_binder.h.

◆ mu_

grpc_core::Mutex grpc_binder::end2end_testing::TransactionProcessor::mu_
private

Definition at line 260 of file fake_binder.h.

◆ terminated_

std::atomic<bool> grpc_binder::end2end_testing::TransactionProcessor::terminated_
private

Definition at line 267 of file fake_binder.h.

◆ tx_receiver_mu_

grpc_core::Mutex grpc_binder::end2end_testing::TransactionProcessor::tx_receiver_mu_
private

Definition at line 269 of file fake_binder.h.

◆ tx_thread_

grpc_core::Thread grpc_binder::end2end_testing::TransactionProcessor::tx_thread_
private

Definition at line 266 of file fake_binder.h.


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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:34