diff --git a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyListCacheImpl.java b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyListCacheImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6065c902714871f0611491478b832087bd557c03 --- /dev/null +++ b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyListCacheImpl.java @@ -0,0 +1,52 @@ +// Copyright © 2020 Amazon Web Services +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.opengroup.osdu.partition.provider.aws.service; + +import org.opengroup.osdu.partition.model.PartitionInfo; +import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Service; +import java.util.List; + +/*** + * We don't want to use cache. Implement a dummy service to always return a cache miss. + */ +@Service +@Qualifier("partitionListCache") +public class PartitionServiceDummyListCacheImpl implements IPartitionServiceCache<String, List<String>> { + public PartitionServiceDummyListCacheImpl() { + + } + + @Override + public void clearAll() { + return; + } + + @Override + public void delete(String arg0) { + return; + } + + @Override + public List<String> get(String arg0) { + return null; + } + + @Override + public void put(String arg0, List<String> arg1) { + return; + } +} diff --git a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyCacheImpl.java b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyPartitionInfoCacheImpl.java similarity index 78% rename from provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyCacheImpl.java rename to provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyPartitionInfoCacheImpl.java index 91e4dd90e7b2f87159e865c627c0a32ec43be576..615ddef175865f4dfa389e754cf28f9c8f4d8ee9 100644 --- a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyCacheImpl.java +++ b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/service/PartitionServiceDummyPartitionInfoCacheImpl.java @@ -16,14 +16,16 @@ package org.opengroup.osdu.partition.provider.aws.service; import org.opengroup.osdu.partition.model.PartitionInfo; import org.opengroup.osdu.partition.provider.interfaces.IPartitionServiceCache; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; /*** * We don't want to use cache. Implement a dummy service to always return a cache miss. */ @Service -public class PartitionServiceDummyCacheImpl implements IPartitionServiceCache<String, Object> { - public PartitionServiceDummyCacheImpl() { +@Qualifier("partitionServiceCache") +public class PartitionServiceDummyPartitionInfoCacheImpl implements IPartitionServiceCache<String, PartitionInfo> { + public PartitionServiceDummyPartitionInfoCacheImpl() { } @@ -43,7 +45,7 @@ public class PartitionServiceDummyCacheImpl implements IPartitionServiceCache<St } @Override - public void put(String arg0, Object arg1) { + public void put(String arg0, PartitionInfo arg1) { return; } }