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

leonchen83 / redis-replicator / #2187

07 Jun 2025 09:11AM UTC coverage: 69.535% (-0.5%) from 69.989%
#2187

push

leonchen83
redis-8.0

1 of 123 new or added lines in 13 files covered. (0.81%)

1 existing line in 1 file now uncovered.

6642 of 9552 relevant lines covered (69.54%)

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/TTLValue.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 TTLValue implements Serializable {
29
    
30
    private static final long serialVersionUID = 1L;
31
    
32
    private Long expires;
33
    private byte[] value;
34

NEW
35
    public TTLValue() {
×
NEW
36
    }
×
37
    
38
    public TTLValue(byte[] value) {
NEW
39
        this(null, value);
×
40
    }
×
41

NEW
42
    public TTLValue(Long expires, byte[] value) {
×
43
        this.expires = expires;
×
44
        this.value = value;
×
45
    }
×
46

47
    public Long getExpires() {
48
        return expires;
×
49
    }
50

51
    public void setExpires(Long expires) {
52
        this.expires = expires;
×
53
    }
×
54

55
    public byte[] getValue() {
56
        return value;
×
57
    }
58

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