• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ben-manes / caffeine / #5173

29 Dec 2025 05:27AM UTC coverage: 0.0% (-100.0%) from 100.0%
#5173

push

github

ben-manes
speed up development ci build

0 of 3838 branches covered (0.0%)

0 of 7869 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/jcache/src/main/java/com/github/benmanes/caffeine/jcache/management/JCacheMXBean.java
1
/*
2
 * Copyright 2015 Ben Manes. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.github.benmanes.caffeine.jcache.management;
17

18
import static java.util.Objects.requireNonNull;
19

20
import javax.cache.Cache;
21
import javax.cache.configuration.CompleteConfiguration;
22
import javax.cache.management.CacheMXBean;
23

24
/**
25
 * The Caffeine JCache management bean.
26
 *
27
 * @author ben.manes@gmail.com (Ben Manes)
28
 */
29
@SuppressWarnings("MemberName")
30
public final class JCacheMXBean implements CacheMXBean {
31
  private final Cache<?, ?> cache;
32

33
  public JCacheMXBean(Cache<?, ?> cache) {
×
34
    this.cache = requireNonNull(cache);
×
35
  }
×
36

37
  @Override
38
  public String getKeyType() {
39
    return configuration().getKeyType().getName();
×
40
  }
41

42
  @Override
43
  public String getValueType() {
44
    return configuration().getValueType().getName();
×
45
  }
46

47
  @Override
48
  public boolean isReadThrough() {
49
    return configuration().isReadThrough();
×
50
  }
51

52
  @Override
53
  public boolean isWriteThrough() {
54
    return configuration().isWriteThrough();
×
55
  }
56

57
  @Override
58
  public boolean isStoreByValue() {
59
    return configuration().isStoreByValue();
×
60
  }
61

62
  @Override
63
  public boolean isStatisticsEnabled() {
64
    return configuration().isStatisticsEnabled();
×
65
  }
66

67
  @Override
68
  public boolean isManagementEnabled() {
69
    return configuration().isManagementEnabled();
×
70
  }
71

72
  @SuppressWarnings("unchecked")
73
  private CompleteConfiguration<?, ?> configuration() {
74
    return cache.getConfiguration(CompleteConfiguration.class);
×
75
  }
76
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc