summaryrefslogtreecommitdiff
path: root/lang/csharp/src/HeapStats.cs
blob: 5b6a9735f3d48a24c7d1dfeeeb1478b53c2caf7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 2011, 2015 Oracle and/or its affiliates.  All rights reserved.
 *
 */
using System;
using System.Collections.Generic;
using System.Text;

namespace BerkeleyDB {
    /// <summary>
    /// Statistical information about a QueueDatabase
    /// </summary>
    public class HeapStats {
        private Internal.HeapStatStruct st;
        internal HeapStats(Internal.HeapStatStruct stats) {
            st = stats;
        }

        /// <summary>
        /// Magic number that identifies the file as a Heap file. 
        /// </summary>
        public uint MagicNumber { get { return st.heap_magic; } }
        /// <summary>
        /// Reports internal flags. For internal use only. 
        /// </summary>
        public uint MetadataFlags { get { return st.heap_metaflags; } }
        /// <summary>
        /// Number of blob records.
        /// </summary>
        public uint nBlobRecords { get { return st.heap_nblobs; } }
        /// <summary>
        /// The number of pages in the database.
        /// </summary>
        public uint nPages { get { return st.heap_pagecnt; } }
        /// <summary>
        /// Reports the number of records in the Heap database.
        /// </summary>
        public uint nRecords { get { return st.heap_nrecs; } }
        /// <summary>
        /// The number of regions in the Heap database.
        /// </summary>
        public uint nRegions { get { return st.heap_nregions; } }
        /// <summary>
        /// The underlying database page (and bucket) size, in bytes.
        /// </summary>
        public uint PageSize { get { return st.heap_pagesize; } }
       /// <summary>
       /// The region size of the Heap database.
       /// </summary>
       public uint RegionSize { get { return st.heap_regionsize; } }
        /// <summary>
        /// The version of the Heap database. 
        /// </summary>
        public uint Version { get { return st.heap_version; } }

    }
}