An Example of a Context Tuple
As an example, consider a scenario when you want to record the type of the member application in the MemberDef for that member any time a member joins a metaspace.
Java Example of a Context Tuple
You could code this in Java as follows:
MemberDef memberDef = MemberDef.create(); memberDef.setDiscovery(“tcp://10.0.1.39:50000?remote=true”); memberDef.setMemberName(“remoteClient1”); Tuple context = Tuple.create(); context.put(“appType”, “BW remote client”); memberDef.setContext(context);Using the MemberDef object to then connect to the metaspace, allows your process to later retrieve the context information from the MemberDef object and use it as appropriate. Another process could also be listening for member connections and retrieve the context information when it’s notified that a new member has joined the metaspace (see the MetaspaceMemberMonitor example). The as-admin show member <member_name> command will also display the context information from the MemberDef object.
See the individual API references for more specific information on the method signatures where context tuples are set and passed.
Related reference
Copyright © Cloud Software Group, Inc. All rights reserved.