Skip to content
Snippets Groups Projects
Commit 5b5da1be authored by Mingyang Zhu's avatar Mingyang Zhu
Browse files

simplify the change by using default interface method

parent 44dc0b00
No related branches found
No related tags found
1 merge request!53customized readiness check to make sure cache layer is ready before serving traffic
package org.opengroup.osdu.partition.provider.interfaces;
public interface IHealthCheckService {
void performLivenessCheck();
void performReadinessCheck();
default void performLivenessCheck() {
}
default void performReadinessCheck() {
}
}
package org.opengroup.osdu.partition.service;
import org.opengroup.osdu.partition.provider.interfaces.IHealthCheckService;
import org.springframework.stereotype.Service;
@Service
public class DefaultHealthCheckImpl implements IHealthCheckService {
@Override
public void performLivenessCheck() {
}
@Override
public void performReadinessCheck() {
}
}
......@@ -2,18 +2,16 @@ package org.opengroup.osdu.partition.provider.azure.service;
import lombok.RequiredArgsConstructor;
import org.opengroup.osdu.partition.model.PartitionInfo;
import org.opengroup.osdu.partition.provider.interfaces.IHealthCheckService;
import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache;
import org.opengroup.osdu.partition.service.DefaultHealthCheckImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
@Service
@Primary
@RequiredArgsConstructor
public class HealthCheckServiceImpl extends DefaultHealthCheckImpl {
public class HealthCheckServiceImpl implements IHealthCheckService {
@Autowired
@Qualifier("partitionServiceCache")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment