1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2009 Oracle.  All rights reserved.
5 *
6 */
7using System;
8using System.Collections.Generic;
9using System.Text;
10
11namespace BerkeleyDB {
12    /// <summary>
13    /// Statistical information about a Sequence
14    /// </summary>
15    public class SequenceStats {
16        private Internal.SequenceStatStruct st;
17        internal SequenceStats(Internal.SequenceStatStruct stats) {
18            st = stats;
19        }
20
21        /// <summary>
22        /// Cache size.
23        /// </summary>
24        public int CacheSize { get { return st.st_cache_size; } }
25        /// <summary>
26        /// Current cached value.
27        /// </summary>
28        public long CachedValue { get { return st.st_value; } }
29        /// <summary>
30        /// Flag value.
31        /// </summary>
32        public uint Flags { get { return st.st_flags; } }
33        /// <summary>
34        /// Last cached value.
35        /// </summary>
36        public long LastCachedValue { get { return st.st_last_value; } }
37        /// <summary>
38        /// Sequence lock granted w/o wait.
39        /// </summary>
40        public ulong LockWait { get { return st.st_wait; } }
41        /// <summary>
42        /// Sequence lock granted after wait.
43        /// </summary>
44        public ulong LockNoWait { get { return st.st_nowait; } }
45        /// <summary>
46        /// Maximum value.
47        /// </summary>
48        public long Max { get { return st.st_max; } }
49        /// <summary>
50        /// Minimum value.
51        /// </summary>
52        public long Min { get { return st.st_min; } }
53        /// <summary>
54        /// Current value in db.
55        /// </summary>
56        public long StoredValue { get { return st.st_current; } }
57    }
58}