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

leonchen83 / redis-replicator / #2180

06 Jun 2025 08:50AM UTC coverage: 69.958% (-1.1%) from 71.103%
#2180

push

chenby
redis 8.0

6639 of 9490 relevant lines covered (69.96%)

0.7 hits per line

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

0.0
/src/main/java/com/moilioncircle/redis/replicator/rdb/datatype/ExpirableValue.java
1
/*
2
 * Copyright 2016-2017 Leon Chen
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

17
package com.moilioncircle.redis.replicator.rdb.datatype;
18

19
import java.io.Serializable;
20
import java.util.Arrays;
21

22
import com.moilioncircle.redis.replicator.util.Strings;
23

24
/**
25
 * @author Leon Chen
26
 * @since 3.9.0
27
 */
28
public class ExpirableValue implements Serializable {
29
    
30
    private static final long serialVersionUID = 1L;
31
    
32
    private Long expires;
33
    private byte[] value;
34

35
    public ExpirableValue() {
×
36
    }
×
37

38
    public ExpirableValue(Long expires, byte[] value) {
×
39
        this.expires = expires;
×
40
        this.value = value;
×
41
    }
×
42

43
    public Long getExpires() {
44
        return expires;
×
45
    }
46

47
    public void setExpires(Long expires) {
48
        this.expires = expires;
×
49
    }
×
50

51
    public byte[] getValue() {
52
        return value;
×
53
    }
54

55
    public void setValue(byte[] value) {
56
        this.value = value;
×
57
    }
×
58
    
59
    @Override
60
    public boolean equals(Object o) {
61
        if (this == o) return true;
×
62
        if (o == null || getClass() != o.getClass()) return false;
×
63
        ExpirableValue that = (ExpirableValue) o;
×
64
        return Arrays.equals(value, that.value);
×
65
    }
66
    
67
    @Override
68
    public int hashCode() {
69
        return Arrays.hashCode(value);
×
70
    }
71
    
72
    @Override
73
    public String toString() {
74
        return "[" + Strings.toString(value) + ", " + expires + "]";
×
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