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

alibaba / jetcache / #405

16 Apr 2024 05:58AM UTC coverage: 0.0% (-88.9%) from 88.866%
#405

push

areyouok
add encoding to fix coverage report

0 of 5353 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
/jetcache-core/src/main/java/com/alicp/jetcache/external/ExternalCacheConfig.java
1
package com.alicp.jetcache.external;
2

3
import com.alicp.jetcache.CacheConfig;
4
import com.alicp.jetcache.support.DecoderMap;
5
import com.alicp.jetcache.support.JavaValueEncoder;
6

7
import java.util.function.Function;
8
import java.util.function.Supplier;
9

10
/**
11
 * Created on 16/9/9.
12
 *
13
 * @author huangli
14
 */
15
public class ExternalCacheConfig<K, V> extends CacheConfig<K, V> {
×
16

17
    private Supplier<String> keyPrefixSupplier;
18
    private Function<Object, byte[]> valueEncoder = JavaValueEncoder.INSTANCE;
×
19
    private Function<byte[], Object> valueDecoder = DecoderMap.defaultJavaValueDecoder();
×
20
    private String broadcastChannel;
21

22
    public String getKeyPrefix() {
23
        return keyPrefixSupplier == null ? null : keyPrefixSupplier.get();
×
24
    }
25

26
    public void setKeyPrefix(String keyPrefix) {
27
        this.keyPrefixSupplier = () -> keyPrefix;
×
28
    }
×
29

30
    public Supplier<String> getKeyPrefixSupplier() {
31
        return keyPrefixSupplier;
×
32
    }
33

34
    public void setKeyPrefixSupplier(Supplier<String> keyPrefixSupplier) {
35
        this.keyPrefixSupplier = keyPrefixSupplier;
×
36
    }
×
37

38
    public Function<Object, byte[]> getValueEncoder() {
39
        return valueEncoder;
×
40
    }
41

42
    public void setValueEncoder(Function<Object, byte[]> valueEncoder) {
43
        this.valueEncoder = valueEncoder;
×
44
    }
×
45

46
    public Function<byte[], Object> getValueDecoder() {
47
        return valueDecoder;
×
48
    }
49

50
    public void setValueDecoder(Function<byte[], Object> valueDecoder) {
51
        this.valueDecoder = valueDecoder;
×
52
    }
×
53

54
    public String getBroadcastChannel() {
55
        return broadcastChannel;
×
56
    }
57

58
    public void setBroadcastChannel(String broadcastChannel) {
59
        this.broadcastChannel = broadcastChannel;
×
60
    }
×
61
}
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

© 2025 Coveralls, Inc