• 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/integration/DisabledCacheWriter.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.integration;
17

18
import java.util.Collection;
19

20
import javax.cache.Cache;
21
import javax.cache.integration.CacheWriter;
22

23
/**
24
 * A cache writer that does nothing.
25
 *
26
 * @author ben.manes@gmail.com (Ben Manes)
27
 */
28
public enum DisabledCacheWriter implements CacheWriter<Object, Object> {
×
29
  INSTANCE;
×
30

31
  /**
32
   * Returns a disabled cache writer.
33
   *
34
   * @param <K> the type of key
35
   * @param <V> the type of value
36
   * @return a cache writer that performs no operation
37
   */
38
  @SuppressWarnings("unchecked")
39
  public static <K, V> CacheWriter<K, V> get() {
40
    return (CacheWriter<K, V>) INSTANCE;
×
41
  }
42

43
  @Override
44
  public void write(Cache.Entry<?, ?> entry) {}
×
45

46
  @Override
47
  public void writeAll(Collection<Cache.Entry<?, ?>> entries) {}
×
48

49
  @Override
50
  public void delete(Object key) {}
×
51

52
  @Override
53
  public void deleteAll(Collection<?> keys) {}
×
54
}
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