public interface CollectiveRepositoryMBean
The ObjectName for this MBean is "WebSphere:feature=collectiveController,type=CollectiveRepository,name=CollectiveRepository".
The Collective Repository stores data in a tree structure of "Nodes". Each Node has path like name, starting from the root Node "/". Nodes may hold data and may have child Nodes.
Example Node tree:
All Node paths are normalized such that additional delimiter slashes are collapsed into a single slash. e.g. "////" resolves to "/" and "/a//b/" resolve to "/a/b". The slash "/" character is the Node path delimiter, and the slash "\" is treated as a normal character (not a delimiter), but its use is highly discouraged. Any trailing whitespace is removed. Any leading whitespace is not valid. Embedded whitespace is preserved. e.g. "/a/b c/d" is a valid path, "/a/b/c " will resolve to "/a/b/c" and " /a/b/c" is not valid.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OBJECT_NAME
A String representing the
ObjectName that this MBean maps to. |
Modifier and Type | Method and Description |
---|---|
boolean |
create(java.lang.String nodeName,
java.lang.Object data)
The create operation creates a new Node with the specified nodeName
in the repository.
|
boolean |
delete(java.lang.String nodeName)
The delete operation deletes the specified Node and all nodes under it.
|
void |
deregisterMember(java.lang.String memberId)
The deregsiterMember operation instructs the repository to unregister the
specified member and discard any active repository services
presently associated with the member.
|
void |
dump(java.lang.String nodeName,
java.lang.String fileName,
java.lang.String correlator)
The dump operation writes the content of the specified Node to a file or
the server log.
|
boolean |
exists(java.lang.String nodeName)
The exists operation indicates whether or not the specified Node exists.
|
java.util.Collection<java.lang.String> |
getChildren(java.lang.String nodeName,
boolean absolutePath)
The getChildren operation returns a collection of the names of the
children Nodes of the specified Node.
|
java.lang.Object |
getData(java.lang.String nodeName)
The getData operation retrieves the data stored in the specified Node.
|
java.util.Map<java.lang.String,java.lang.Object> |
getDescendantData(java.lang.String nodeName)
The getDescendantData operation retrieves the data stored in the
specified Node and the data of all of its descendants.
|
java.lang.String |
registerMember(int heartBeatInterval,
java.util.Map<java.lang.String,java.lang.Object> memberData)
The registerMember operation registers this member with the repository and
starts the repository monitoring of this member.
|
java.security.cert.Certificate |
retrieveMemberRootCertificate()
Retrieve the member root certificate from the controller.
|
void |
sendHeartBeat(java.lang.String memberId)
The sendHeartBeat operation sends a heart beat for the specified member
to the repository.
|
void |
sendHeartBeat(java.lang.String memberId,
int newHeartBeatInterval)
This form of the sendHeartBeat operation allows the member to specify
a new heart beat interval.
|
boolean |
setData(java.lang.String nodeName,
java.lang.Object data)
The setData operation stores data in the specified Node.
|
static final java.lang.String OBJECT_NAME
ObjectName
that this MBean maps to.boolean create(java.lang.String nodeName, java.lang.Object data) throws java.io.IOException, java.lang.IllegalArgumentException
If the Node already exists, no action is taken (the data is not altered).
The root "/" Node always exists and therefore can not be created.
nodeName
- The fully qualified Node name, starting from the root "/".data
- The data to store in the Node, null
is supported.true
if the creation was successful, false
if the node already existed.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.lang.IllegalStateException
- If the service is deactivatedboolean delete(java.lang.String nodeName) throws java.io.IOException, java.lang.IllegalArgumentException
The root "/" Node can not be deleted.
nodeName
- The fully qualified Node name, starting from the root "/".true
if the Node was deleted, false
if the Node did not exist.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validboolean exists(java.lang.String nodeName) throws java.io.IOException, java.lang.IllegalArgumentException
The root "/" Node always exists.
nodeName
- The fully qualified Node name, starting from the root "/".true
if the specified Node exists, false
otherwise.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.lang.Object getData(java.lang.String nodeName) throws java.io.IOException, java.lang.IllegalArgumentException, java.util.NoSuchElementException
The root "/" Node never has any data.
nodeName
- The fully qualified Node name, starting from the root "/".null
may be returned.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.util.NoSuchElementException
- If the node does not existjava.util.Map<java.lang.String,java.lang.Object> getDescendantData(java.lang.String nodeName) throws java.io.IOException, java.lang.IllegalArgumentException, java.util.NoSuchElementException
The root "/" Node never has any data.
nodeName
- The fully qualified Node name, starting from the root "/".null
if the node has no value.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.util.NoSuchElementException
- If the node does not existboolean setData(java.lang.String nodeName, java.lang.Object data) throws java.io.IOException, java.lang.IllegalArgumentException
The data replaces any data already stored in the specified Node. This will not create the Node if it does note exist.
The root "/" Node can never store data.
nodeName
- The fully qualified Node name, starting from the root "/".data
- The data to store in the Node, null
is supported.true
if the Node was updated, false
if the Node did not exist.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.util.Collection<java.lang.String> getChildren(java.lang.String nodeName, boolean absolutePath) throws java.io.IOException, java.lang.IllegalArgumentException
nodeName
- The fully qualified Node name, starting from the root "/".absolutePath
- True if the returned collection should contain fully qualified node names.null
is returned if the Node does not exist.
If the Node exists and no children exist, the array will be empty.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the nodeName is not validjava.lang.String registerMember(int heartBeatInterval, java.util.Map<java.lang.String,java.lang.Object> memberData) throws java.io.IOException, java.lang.IllegalArgumentException
NOTE: when the liberty.userdir is provided in the memberData for a member, it must be UTF8 encoded with no trailing slashes to match the joined member.
heartBeatInterval
- The heart beat interval, in seconds, for this member.memberData
- Provides data unique to this member; null
may be provided if no data is requiredjava.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the heartBeatInterval is not validvoid deregisterMember(java.lang.String memberId) throws java.io.IOException
If the member is already disconnected, this operation has no effect.
memberId
- The member unregistering with the repository.java.io.IOException
- If there was any problem completing the requestvoid sendHeartBeat(java.lang.String memberId) throws java.io.IOException, java.lang.IllegalArgumentException
memberId
- The member identifier to which the heart beat belongs.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the memberId is not validvoid sendHeartBeat(java.lang.String memberId, int newHeartBeatInterval) throws java.io.IOException, java.lang.IllegalArgumentException
sendHeartBeat(String)
.memberId
- The member identifier to which the heart beat belongs.newHeartBeatInterval
- The new heart beat interval, in seconds,
for this member.java.io.IOException
- If there was any problem completing the requestjava.lang.IllegalArgumentException
- If the memberId or newHeartBeatInterval is not validvoid dump(java.lang.String nodeName, java.lang.String fileName, java.lang.String correlator) throws java.io.IOException, java.lang.IllegalArgumentException
nodeName
- The fully qualified Node name, starting from the root "/".fileName
- The file to dump the content to. Default to server log if null
or empty.
WebSphere Application Server symbols in the fileName will be resolved.correlator
- An optional string to identify the dump. It will be
the first line of the dump if not null
or empty.java.io.IOException
- If there was any problem completing the request.java.lang.IllegalArgumentException
- If the nodeName is invalid.java.security.cert.Certificate retrieveMemberRootCertificate() throws java.io.IOException, java.security.KeyStoreException, java.security.AccessControlException
java.io.IOException
- If there was any problem completing the request.java.security.KeyStoreException
- If there was a problem accessing the certificate.java.security.AccessControlException
- If the requester is not a member.