Class PartitionHandler
java.lang.Object
org.jgroups.admin.AdminHandler
org.jgroups.admin.PartitionHandler
Injects partitions into a cluster (via injectView()). The syntax is string based, and partitions are separated
by '||'. Example: if we have member A,B,C,D,E, we can inject a partition with injectView("A,B,C || D,E"). To
heal this, injectView("A,B,C,D") can be used. Note that view IDs will be incremented by 1, but no MergeViews
will be installed.
- Since:
- 5.6.0
- Author:
- Bela Ban
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected final ResponseCollector<View> protected longFields inherited from class AdminHandler
ch, FAIL, OK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ViewcreateView(String mbrs) executeRequest(String req) protected static AddressgetByValue(Map<Address, String> cache, String name) getMembers(String view) voidhandleRequest(Message msg, AdminHeader hdr) voidhandleResponse(Message msg, AdminHeader hdr) voidinjectMergeView(String view) Fetches the views from all members (GET_VIEW), collects all responses (GET_VIEW_RSP), creates a map of addresses and views and sends that map to all members, which inject that as a MERGE event into GMSvoidinjectView(String views) Injects non-overlapping views into members.longtimeout()timeout(long t) Methods inherited from class AdminHandler
channel, handleMessage, sendRequest, sendRequest, sendResponse, sendResponse
-
Field Details
-
KEY
- See Also:
-
INJECT_VIEW
- See Also:
-
INJECT_MERGE_VIEW
- See Also:
-
INJECT_MERGE_EVENT
- See Also:
-
GET_VIEW
- See Also:
-
GET_VIEW_RSP
- See Also:
-
rsp_coll
-
timeout
protected long timeout
-
-
Constructor Details
-
PartitionHandler
-
-
Method Details
-
timeout
public long timeout() -
timeout
-
executeRequest
- Overrides:
executeRequestin classAdminHandler
-
injectView
Injects non-overlapping views into members. Example: "A,B,C || D,E" injects view {A,B,C} into A, B and C, and {D,E} into D and E. "A,B,C,D,E" injects view {A,B,C,D,E} into all members, healing the partition.- Parameters:
views- The partition to be injected
-
injectMergeView
Fetches the views from all members (GET_VIEW), collects all responses (GET_VIEW_RSP), creates a map of addresses and views and sends that map to all members, which inject that as a MERGE event into GMS -
handleRequest
- Specified by:
handleRequestin classAdminHandler
-
handleResponse
- Specified by:
handleResponsein classAdminHandler
-
getMembers
-
createView
-
getByValue
-