From 299c2a5c7849ad84ebf76e107428c8b2dbe9d348 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Mon, 15 Apr 2024 13:21:33 -0400 Subject: [PATCH] remove default implementations from interface --- .../cryostat/reports/MemoryCachingReportsService.java | 10 ++++++++++ src/main/java/io/cryostat/reports/ReportsService.java | 8 ++------ .../java/io/cryostat/reports/ReportsServiceImpl.java | 10 ++++++++++ .../cryostat/reports/StorageCachingReportsService.java | 10 ++++++++++ 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/cryostat/reports/MemoryCachingReportsService.java b/src/main/java/io/cryostat/reports/MemoryCachingReportsService.java index 3da2f86e4..1fd1bb9ad 100644 --- a/src/main/java/io/cryostat/reports/MemoryCachingReportsService.java +++ b/src/main/java/io/cryostat/reports/MemoryCachingReportsService.java @@ -98,4 +98,14 @@ public Uni> reportFor( return delegate.reportFor(jvmId, filename); }); } + + @Override + public Uni> reportFor(ActiveRecording recording) { + return reportFor(recording, r -> true); + } + + @Override + public Uni> reportFor(String jvmId, String filename) { + return reportFor(jvmId, filename, r -> true); + } } diff --git a/src/main/java/io/cryostat/reports/ReportsService.java b/src/main/java/io/cryostat/reports/ReportsService.java index 4edc2c005..14a22764d 100644 --- a/src/main/java/io/cryostat/reports/ReportsService.java +++ b/src/main/java/io/cryostat/reports/ReportsService.java @@ -29,16 +29,12 @@ public interface ReportsService { Uni> reportFor( ActiveRecording recording, Predicate predicate); - default Uni> reportFor(ActiveRecording recording) { - return reportFor(recording, r -> true); - } + Uni> reportFor(ActiveRecording recording); Uni> reportFor( String jvmId, String filename, Predicate predicate); - default Uni> reportFor(String jvmId, String filename) { - return reportFor(jvmId, filename, r -> true); - } + Uni> reportFor(String jvmId, String filename); static String key(ActiveRecording recording) { return String.format("%s/%d", recording.target.jvmId, recording.id); diff --git a/src/main/java/io/cryostat/reports/ReportsServiceImpl.java b/src/main/java/io/cryostat/reports/ReportsServiceImpl.java index 6d81a748f..ddc38d688 100644 --- a/src/main/java/io/cryostat/reports/ReportsServiceImpl.java +++ b/src/main/java/io/cryostat/reports/ReportsServiceImpl.java @@ -115,6 +115,16 @@ public Uni> reportFor( return Uni.createFrom().future(future); } + @Override + public Uni> reportFor(ActiveRecording recording) { + return reportFor(recording, r -> true); + } + + @Override + public Uni> reportFor(String jvmId, String filename) { + return reportFor(jvmId, filename, r -> true); + } + private Future> process( InputStream stream, Predicate predicate) { return reportGenerator.generateEvalMapInterruptibly( diff --git a/src/main/java/io/cryostat/reports/StorageCachingReportsService.java b/src/main/java/io/cryostat/reports/StorageCachingReportsService.java index f3646d6d0..7a4a6e2b1 100644 --- a/src/main/java/io/cryostat/reports/StorageCachingReportsService.java +++ b/src/main/java/io/cryostat/reports/StorageCachingReportsService.java @@ -157,4 +157,14 @@ private Uni> getStorage(String key) { } }); } + + @Override + public Uni> reportFor(ActiveRecording recording) { + return reportFor(recording, r -> true); + } + + @Override + public Uni> reportFor(String jvmId, String filename) { + return reportFor(jvmId, filename, r -> true); + } }