Package org.apache.nifi.cluster.manager
Class RemoteProcessGroupEntityMerger
java.lang.Object
org.apache.nifi.cluster.manager.RemoteProcessGroupEntityMerger
- All Implemented Interfaces:
ComponentEntityMerger<RemoteProcessGroupEntity>
,ComponentEntityStatusMerger<RemoteProcessGroupStatusDTO>
public class RemoteProcessGroupEntityMerger
extends Object
implements ComponentEntityMerger<RemoteProcessGroupEntity>, ComponentEntityStatusMerger<RemoteProcessGroupStatusDTO>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
merge
(RemoteProcessGroupEntity clientEntity, Map<NodeIdentifier, RemoteProcessGroupEntity> entityMap) Merges the ComponentEntity responses according to theirPermissionsDTO
s.void
mergeComponents
(RemoteProcessGroupEntity clientEntity, Map<NodeIdentifier, RemoteProcessGroupEntity> entityMap) Merges the RemoteProcessGroupEntity responses.private static void
mergeDtos
(RemoteProcessGroupDTO clientDto, Map<NodeIdentifier, RemoteProcessGroupDTO> dtoMap) void
mergeStatus
(RemoteProcessGroupStatusDTO clientStatus, boolean clientStatusReadablePermission, RemoteProcessGroupStatusDTO status, boolean statusReadablePermission, NodeIdentifier statusNodeIdentifier) Merges status into clientStatus based on the given permissions.
-
Constructor Details
-
RemoteProcessGroupEntityMerger
public RemoteProcessGroupEntityMerger()
-
-
Method Details
-
merge
public void merge(RemoteProcessGroupEntity clientEntity, Map<NodeIdentifier, RemoteProcessGroupEntity> entityMap) Description copied from interface:ComponentEntityMerger
Merges the ComponentEntity responses according to theirPermissionsDTO
s. Responsible for invokinginvalid reference
ComponentEntityMerger#mergeComponents(EntityType, Map)
- Specified by:
merge
in interfaceComponentEntityMerger<RemoteProcessGroupEntity>
- Parameters:
clientEntity
- the entity being returned to the cliententityMap
- all node responses
-
mergeComponents
public void mergeComponents(RemoteProcessGroupEntity clientEntity, Map<NodeIdentifier, RemoteProcessGroupEntity> entityMap) Merges the RemoteProcessGroupEntity responses.- Specified by:
mergeComponents
in interfaceComponentEntityMerger<RemoteProcessGroupEntity>
- Parameters:
clientEntity
- the entity being returned to the cliententityMap
- all node responses
-
mergeStatus
public void mergeStatus(RemoteProcessGroupStatusDTO clientStatus, boolean clientStatusReadablePermission, RemoteProcessGroupStatusDTO status, boolean statusReadablePermission, NodeIdentifier statusNodeIdentifier) Description copied from interface:ComponentEntityStatusMerger
Merges status into clientStatus based on the given permissions.- Specified by:
mergeStatus
in interfaceComponentEntityStatusMerger<RemoteProcessGroupStatusDTO>
- Parameters:
clientStatus
- The status that will be returned to the client after mergingclientStatusReadablePermission
- The read permission of the status that will be returned to the client after mergingstatus
- The status to be merged into the client statusstatusReadablePermission
- The read permission of the status to be merged into the client statusstatusNodeIdentifier
- TheNodeIdentifier
of the node from which status was received
-
mergeDtos
private static void mergeDtos(RemoteProcessGroupDTO clientDto, Map<NodeIdentifier, RemoteProcessGroupDTO> dtoMap)
-