iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::DeadNodeView< T > Class Template Reference

Contains all details of a [Node] that is dead. More...

#include <node_state.hpp>

Public Member Functions

 DeadNodeView (const DeadNodeView &)=default
 
 DeadNodeView (DeadNodeView &&)=default
 
auto operator= (const DeadNodeView &) -> DeadNodeView &=default
 
auto operator= (DeadNodeView &&) -> DeadNodeView &=default
 
 ~DeadNodeView ()=default
 
 DeadNodeView (const AliveNodeView< T > &view)
 
auto id () const -> const UniqueNodeId &
 Returns the [NodeId].
 
auto details () const -> bb::Optional< NodeDetails >
 
auto try_remove_stale_resources () -> iox2::bb::Expected< void, NodeCleanupFailure >
 
auto blocking_remove_stale_resources (iox2::bb::Duration timeout) -> iox2::bb::Expected< void, NodeCleanupFailure >
 

Detailed Description

template<ServiceType T>
class iox2::DeadNodeView< T >

Contains all details of a [Node] that is dead.

Definition at line 52 of file node_state.hpp.

Constructor & Destructor Documentation

◆ DeadNodeView() [1/3]

template<ServiceType T>
iox2::DeadNodeView< T >::DeadNodeView ( const DeadNodeView< T > &  )
default

◆ DeadNodeView() [2/3]

template<ServiceType T>
iox2::DeadNodeView< T >::DeadNodeView ( DeadNodeView< T > &&  )
default

◆ ~DeadNodeView()

template<ServiceType T>
iox2::DeadNodeView< T >::~DeadNodeView ( )
default

◆ DeadNodeView() [3/3]

template<ServiceType T>
iox2::DeadNodeView< T >::DeadNodeView ( const AliveNodeView< T > &  view)
explicit

Member Function Documentation

◆ blocking_remove_stale_resources()

template<ServiceType T>
auto iox2::DeadNodeView< T >::blocking_remove_stale_resources ( iox2::bb::Duration  timeout) -> iox2::bb::Expected< void, NodeCleanupFailure >

Removes all stale resources of a dead [Node]. If another instance is already removing the dead [Node] it waits until the other instance has cleaned up the dead [Node] completely. If the other cleanup instance crashes, it will take over the ownership and continue the cleanup. If the process does not have the permission to cleanup all resources it aborts with an error.

If the provided timeout is expired it will return with [NodeCleanupFailure::AnotherInstanceIsCleaningUp].

◆ details()

template<ServiceType T>
auto iox2::DeadNodeView< T >::details ( ) const -> bb::Optional< NodeDetails >

Returns a optional [NodeDetails] that contains further information about the [Node]. Can only be acquired when the process has the access right to read it.

◆ id()

template<ServiceType T>
auto iox2::DeadNodeView< T >::id ( ) const -> const UniqueNodeId &

Returns the [NodeId].

◆ operator=() [1/2]

template<ServiceType T>
auto iox2::DeadNodeView< T >::operator= ( const DeadNodeView< T > &  ) -> DeadNodeView &=default
default

◆ operator=() [2/2]

template<ServiceType T>
auto iox2::DeadNodeView< T >::operator= ( DeadNodeView< T > &&  ) -> DeadNodeView &=default
default

◆ try_remove_stale_resources()

template<ServiceType T>
auto iox2::DeadNodeView< T >::try_remove_stale_resources ( ) -> iox2::bb::Expected< void, NodeCleanupFailure >

Removes all stale resources of the dead [Node]. On error it returns a [NodeCleanupFailure]. It returns true if the stale resources could be removed, otherwise false.


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