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

eXist-db / exist / 40657517912

28 Oct 2026 08:32AM UTC coverage: 58.121% (-0.08%) from 58.196%
40657517912

push

github

web-flow
Merge pull request #6938 from eXist-db/dependabot/github_actions/actions-0c219a018e

Bump docker/login-action from 4.6.0 to 4.7.0 in the actions group

32462 of 61752 branches covered (52.57%)

Branch coverage included in aggregate %.

85521 of 141244 relevant lines covered (60.55%)

2.72 hits per line

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

0.0
/exist-core/src/main/java/org/exist/management/impl/BinaryInputStreamCacheInfo.java
1
/*
2
 * eXist-db Open Source Native XML Database
3
 * Copyright (C) 2001 The eXist-db Authors
4
 *
5
 * info@exist-db.org
6
 * http://www.exist-db.org
7
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Lesser General Public
10
 * License as published by the Free Software Foundation; either
11
 * version 2.1 of the License, or (at your option) any later version.
12
 *
13
 * This library is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 * Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public
19
 * License along with this library; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
 */
22

23
package org.exist.management.impl;
24

25
import javax.annotation.Nullable;
26
import java.nio.file.Path;
27
import java.util.Date;
28
import java.util.Optional;
29

30
/**
31
 * Simple bean to hold JMX info and a Binary Input Stream's cache
32
 */
33
public class BinaryInputStreamCacheInfo {
34

35
    private final long created;
36
    private final CacheType cacheType;
37
    private final Optional<Path> file;
38
    private final long size;
39

40
    public BinaryInputStreamCacheInfo(final CacheType cacheType, final long created, final Optional<Path> file,
×
41
                                      final long size) {
42
        this.created = created;
×
43
        this.cacheType = cacheType;
×
44
        this.file = file;
×
45
        this.size = size;
×
46
    }
×
47

48
    /**
49
     * Get the time that the Cache was created.
50
     *
51
     * @return the time the Cache was created
52
     */
53
    public Date getCreated() {
54
        return new Date(created);
×
55
    }
56

57
    /**
58
     * Get the type of the Cache.
59
     *
60
     * @return the type of the Cache
61
     */
62
    public CacheType getCacheType() {
63
        return cacheType;
×
64
    }
65

66
    /**
67
     * Get the path of the file backing the cache.
68
     *
69
     * @return The path of the file backing the cache (if there is one)
70
     */
71
    @Nullable
72
    public String getFile() {
73
        return file
×
74
                .map(Path::toAbsolutePath)
×
75
                .map(Path::toString)
×
76
                .orElse(null);
×
77
    }
78

79
    /**
80
     * Get the size of the cache.
81
     *
82
     * @return the size of the cache.
83
     */
84
    public long getSize() {
85
        return size;
×
86
    }
87

88
    enum CacheType {
×
89
        FILE,
×
90
        MEMORY_MAPPED_FILE,
×
91
        MEMORY
×
92
    }
93
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc