A member of a MAMA fault tolerance group
Inherits from Wombat.MamaWrapper, IDisposable
Inherited by Wombat.MamaBridgeFtMember, Wombat.MamaMulticastFtMember
Name | |
---|---|
MamaFtMember() | |
void | create() Create object. This function is typically followed by MamaFtMember.setup and MamaFtMember.activate |
void | setup(MamaQueue queue, MamaFtMemberCallback callback, MamaTransport transport, string groupName, uint weight, double heartbeatInterval, double timeoutInterval, object closure) |
void | activate() Activate the MAMA fault tolerance group member. |
void | deactivate() Deactivate the MAMA fault tolerance group member. |
bool | isActive() Get whether the MAMA fault tolerance member is actively running (not related to its state). Use mamaFtMember.getState() to determine the actual state of the member. |
string | getGroupName() Get the group name to which this MAMA FT member belongs. |
uint | getWeight() Get the fault tolerance weight of the MAMA FT member. |
double | getHeartbeatInterval() Get the fault tolerance heartbeat interval of the MAMA FT member. |
double | getTimeoutInterval() Get the fault tolerance timeout interval of the MAMA FT member. |
object | getClosure() Get the closure argument (provided in the mamaFtMember.create() function) of the MAMA FT member. |
void | setWeight(uint value) Set the fault tolerance weight of the MAMA FT member. The FT weight can be changed dynamically, if desired. The member with the highest weight will become the active member. |
void | setInstanceId(string id) Set the instance ID of the MAMA FT member |
string | mamaFtStateToString(mamaFtState state) Convert a fault tolerant state to a string |
Name | |
---|---|
void | setupFtType(mamaFtType ftType, MamaQueue queue, MamaFtMemberCallback callback, MamaTransport transport, string groupName, uint weight, double heartbeatInterval, double timeoutInterval, object closure) |
virtual override MamaStatus.mamaStatus | DestroyNativePeer() Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer |
Public Functions inherited from Wombat.MamaWrapper
Name | |
---|---|
void | Dispose() Destroys the underlying peer object and unbinds the wrapper from it. |
void | setNativeHandle(IntPtr nHandle) Sets the native handle of the native peer object. Should only be used by subclasses and in the same assembly. |
Protected Functions inherited from Wombat.MamaWrapper
Name | |
---|---|
MamaWrapper() Constructs a new wrapper object but doesn’t create it. If the object is not explicitly disposed it will remain registered for finalization and will attempt the destroy the native peer object when finalized. |
|
MamaWrapper(IntPtr nativeHandle) Constructs a managed wrapper from an existing native peer. The peer object will not be automatically finalized |
|
virtual void | Dispose(bool disposing, bool destroyNativeHandle =true) The actual implementation of Dispose - called by both the Dispose method and the finalizer. |
virtual void | OnDispose() |
Protected Attributes inherited from Wombat.MamaWrapper
Name | |
---|---|
IntPtr | nativeHandle the handle to the native peer object |
MamaFtMember()
void create()
Create object. This function is typically followed by MamaFtMember.setup and MamaFtMember.activate
void setup(
MamaQueue queue,
MamaFtMemberCallback callback,
MamaTransport transport,
string groupName,
uint weight,
double heartbeatInterval,
double timeoutInterval,
object closure
)
void activate()
Activate the MAMA fault tolerance group member.
void deactivate()
Deactivate the MAMA fault tolerance group member.
bool isActive()
Get whether the MAMA fault tolerance member is actively running (not related to its state). Use mamaFtMember.getState() to determine the actual state of the member.
string getGroupName()
Get the group name to which this MAMA FT member belongs.
uint getWeight()
Get the fault tolerance weight of the MAMA FT member.
double getHeartbeatInterval()
Get the fault tolerance heartbeat interval of the MAMA FT member.
double getTimeoutInterval()
Get the fault tolerance timeout interval of the MAMA FT member.
object getClosure()
Get the closure argument (provided in the mamaFtMember.create() function) of the MAMA FT member.
void setWeight(
uint value
)
Set the fault tolerance weight of the MAMA FT member. The FT weight can be changed dynamically, if desired. The member with the highest weight will become the active member.
void setInstanceId(
string id
)
Set the instance ID of the MAMA FT member
The instance ID is used to uniquely identify members of a fault tolerant group. Most applications should allow the MAMA API to automatically set the instance ID and this function would not be called. If not set explicitly before activation, then the instance ID is automatically set according to the following format:
{group-name}.{hex-ip-addr}.{hex-pid}
For example, if the group name is “FOO”, the IP address is 192.168.187.9, and the PId is 10777, the default instance ID would be:
FOO.c0a8bb9.2a19
static string mamaFtStateToString(
mamaFtState state
)
Convert a fault tolerant state to a string
void setupFtType(
mamaFtType ftType,
MamaQueue queue,
MamaFtMemberCallback callback,
MamaTransport transport,
string groupName,
uint weight,
double heartbeatInterval,
double timeoutInterval,
object closure
)
virtual override MamaStatus.mamaStatus DestroyNativePeer()
Implements the destruction of the underlying peer object MamaWrapper.DestroyNativePeer
Reimplements: Wombat::MamaWrapper::DestroyNativePeer
Updated on 2023-03-31 at 15:29:32 +0100