@Singleton public class PersistedStateImpl extends Object implements PersistedState
| Constructor and Description |
|---|
PersistedStateImpl() |
| Modifier and Type | Method and Description |
|---|---|
Map<ClusterTopology,List<LogicalRequest>> |
getAllRequests()
Get all persisted requests.
|
LogicalRequest |
getProvisionRequest(long clusterId)
Returns provision request for a cluster
|
void |
persistLogicalRequest(LogicalRequest logicalRequest,
long topologyRequestId)
Persist a logical request.
|
PersistedTopologyRequest |
persistTopologyRequest(BaseClusterRequest request)
Persist a topology request.
|
void |
registerHostName(long hostRequestId,
String hostName)
Registeer a host with a host request.
|
void |
registerInTopologyHostInfo(Host host) |
void |
registerPhysicalTask(long logicalTaskId,
long physicalTaskId)
Register a physical task with a logical task.
|
void |
removeHostRequests(long logicalRequestId,
Collection<HostRequest> hostRequests)
Remove the given host requests (must belong to the same topology request),
and also the topology request if it does not have any host requests left.
|
void |
setHostRequestStatus(long hostRequestId,
HostRoleStatus status,
String message)
Update the status of the given host request.
|
public PersistedTopologyRequest persistTopologyRequest(BaseClusterRequest request)
PersistedStatepersistTopologyRequest in interface PersistedStaterequest - topology request to persistpublic void persistLogicalRequest(LogicalRequest logicalRequest, long topologyRequestId)
PersistedStatepersistLogicalRequest in interface PersistedStatelogicalRequest - logical request to persisttopologyRequestId - the id of the associated topology requestpublic void removeHostRequests(long logicalRequestId,
Collection<HostRequest> hostRequests)
PersistedStateremoveHostRequests in interface PersistedStatepublic void setHostRequestStatus(long hostRequestId,
HostRoleStatus status,
String message)
PersistedStatesetHostRequestStatus in interface PersistedStatepublic void registerPhysicalTask(long logicalTaskId,
long physicalTaskId)
PersistedStateregisterPhysicalTask in interface PersistedStatelogicalTaskId - logical task idphysicalTaskId - physical task idpublic void registerHostName(long hostRequestId,
String hostName)
PersistedStateregisterHostName in interface PersistedStatehostRequestId - host request idhostName - name of host being registeredpublic void registerInTopologyHostInfo(Host host)
registerInTopologyHostInfo in interface PersistedStatepublic LogicalRequest getProvisionRequest(long clusterId)
PersistedStategetProvisionRequest in interface PersistedStatepublic Map<ClusterTopology,List<LogicalRequest>> getAllRequests()
PersistedStategetAllRequests in interface PersistedStateCopyright © 2022 Apache Software Foundation. All rights reserved.