public class IgnoredDomainResourceRegistry.IgnoredClonedProfileRegistry extends Object
This class is for internal use only.
The main purpose of this registry is to deal with the situation where a profile is explicitly ignored on the slave,
and that profile is cloned. So say that the ignored profile is ignored on the slave, and a call comes to
/profile=ignore:clone(to-profile=new). Since the ignored profile is ignored on the slave, the
clone operation never gets called, so no new profile gets created on the slave. Hence, we need
to ignore all subsequent operation invocations on the slave for the new profile. This class maintains the
runtime registry of profiles resulting from clone operations on profiles that were ignored on this slave.
The situation above where the new profile does not get created on the slave due to the profile
being explicitly ignored on the slave, will result in the server being put into the reload-required state
since according to the explicit ignores it should really be part of the slave's domain model, and a reload of the
slave will download that.
If the profile was also explicitly ignored, we do not add it to the runtime registry and do not put the
server into the reload-required state. The settings in the slave model deal with the ignores for us in
that case.
Finally in the example above, a call to /profile=new:remove will remove the new profile from the
runtime registry of profiles resulting from clone operations on profiles that were ignored on this slave.
The registry is transactional, using a transaction local copy of the changes made, and should be published/rolled back on transaction completion.
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIgnoredProfileClone(org.jboss.dmr.ModelNode operation)
Checks if an operation should be ignored, and updates the runtime registry and host state as required.
|
void |
complete(boolean rollback)
Callback for when the controller transaction completes.
|
void |
initializeModelSync()
Callback for starting applying a fresh domain model from the DC.
|
boolean |
isReloadRequired()
Check if the changes to the registry should cause the slave to be put into the
reload-required state. |
public boolean checkIgnoredProfileClone(org.jboss.dmr.ModelNode operation)
isReloadRequired() to check if the host state should be set to reload-required.operation - the operation to checkpublic void initializeModelSync()
public void complete(boolean rollback)
rollback - true if the changes should be rolled back, false if they should be committed.public boolean isReloadRequired()
reload-required state.true if the host should be put into the reload-required state, false otherwise.Copyright © 2016 JBoss by Red Hat. All rights reserved.