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

wz2cool / local-queue / #34

01 Feb 2025 08:21AM UTC coverage: 91.919% (+0.2%) from 91.754%
#34

push

wz2cool
add hour cycle

25 of 26 new or added lines in 8 files covered. (96.15%)

546 of 594 relevant lines covered (91.92%)

0.92 hits per line

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

71.43
/src/main/java/com/github/wz2cool/localqueue/helper/ChronicleQueueHelper.java
1
package com.github.wz2cool.localqueue.helper;
2

3
import com.github.wz2cool.localqueue.model.enums.RollCycleType;
4
import net.openhft.chronicle.core.time.SystemTimeProvider;
5
import net.openhft.chronicle.queue.DefaultCycleCalculator;
6
import net.openhft.chronicle.queue.RollCycle;
7
import net.openhft.chronicle.queue.RollCycles;
8

9
/**
10
 * Chronicle Queue Helper
11
 *
12
 * @author frank
13
 */
14
public class ChronicleQueueHelper {
×
15

16
    public static int cycle(final RollCycle rollCycle, final long timestamp) {
17
        long offsetMillis = System.currentTimeMillis() - timestamp;
1✔
18
        return DefaultCycleCalculator.INSTANCE.currentCycle(rollCycle, SystemTimeProvider.INSTANCE, offsetMillis);
1✔
19
    }
20

21
    public static RollCycle getRollCycle(final RollCycleType rollCycleType) {
22
        switch (rollCycleType) {
1✔
23
            case HOURLY:
24
                return RollCycles.FAST_HOURLY;
1✔
25
            case DAILY:
26
                return RollCycles.FAST_DAILY;
1✔
27
            default:
NEW
28
                throw new IllegalArgumentException("rollCycleType is not support.");
×
29
        }
30
    }
31
}
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