Search in sources :

Example 1 with ServiceStatusDto

use of org.bf2.srs.fleetmanager.rest.service.model.ServiceStatusDto in project srs-fleet-manager by bf2fc6cc711aee1a0c2a.

the class RegistryServiceImpl method getServiceStatus.

@Override
public ServiceStatusDto getServiceStatus() {
    long total = storage.getRegistryCountTotal();
    ServiceStatusDto status = new ServiceStatusDto();
    status.setMaxInstancesReached(total >= maxInstances);
    return status;
}
Also used : ServiceStatusDto(org.bf2.srs.fleetmanager.rest.service.model.ServiceStatusDto)

Example 2 with ServiceStatusDto

use of org.bf2.srs.fleetmanager.rest.service.model.ServiceStatusDto in project srs-fleet-manager by bf2fc6cc711aee1a0c2a.

the class Convert method convert.

public ServiceStatus convert(ServiceStatusDto status) {
    ServiceStatus res = new ServiceStatus();
    res.setMaxInstancesReached(status.isMaxInstancesReached());
    return res;
}
Also used : ServiceStatus(org.bf2.srs.fleetmanager.rest.publicapi.beans.ServiceStatus)

Aggregations

ServiceStatus (org.bf2.srs.fleetmanager.rest.publicapi.beans.ServiceStatus)1 ServiceStatusDto (org.bf2.srs.fleetmanager.rest.service.model.ServiceStatusDto)1