summaryrefslogtreecommitdiff
path: root/lang/java/src/com/sleepycat/db/VerboseConfig.java
blob: 71ed14949463282e1d2ac1bbddb29f2bdd751ce1 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 2002, 2015 Oracle and/or its affiliates.  All rights reserved.
 *
 * $Id$
 */

package com.sleepycat.db;

import com.sleepycat.db.internal.DbConstants;
import com.sleepycat.db.internal.DbEnv;

/** Specifies the attributes of a verification operation. */
public final class VerboseConfig {
    /**
    Display additional information when performing hot backup.
    */
    public static final VerboseConfig BACKUP =
        new VerboseConfig("BACKUP", DbConstants.DB_VERB_BACKUP);
    /**
    Display additional information when doing deadlock detection.
    */
    public static final VerboseConfig DEADLOCK =
        new VerboseConfig("DEADLOCK", DbConstants.DB_VERB_DEADLOCK);
    /**
    Display additional information when performing filesystem operations such
    as open, close or rename. May not be available on all platforms.
    */
    public static final VerboseConfig FILEOPS =
        new VerboseConfig("FILEOPS", DbConstants.DB_VERB_FILEOPS);
    /**
    Display additional information when performing all filesystem operations,
    including read and write. May not be available on all platforms.
    */
    public static final VerboseConfig FILEOPS_ALL =
        new VerboseConfig("FILEOPS_ALL", DbConstants.DB_VERB_FILEOPS_ALL);
    /**
    Display additional information when performing recovery.
    */
    public static final VerboseConfig RECOVERY =
        new VerboseConfig("RECOVERY", DbConstants.DB_VERB_RECOVERY);
    /**
    Display additional information concerning support for {@link
    EnvironmentConfig#setRegister}.
    */
    public static final VerboseConfig REGISTER =
        new VerboseConfig("REGISTER", DbConstants.DB_VERB_REGISTER);
    /**
    Display all detailed information about replication.  This includes the
    information displayed by all of the other REPLICATION_* and REPMGR_*
    values.
    */
    public static final VerboseConfig REPLICATION =
        new VerboseConfig("REPLICATION", DbConstants.DB_VERB_REPLICATION);
    /**
    Display detailed information about Replication Manager connection failures.
    */
    public static final VerboseConfig REPMGR_CONNFAIL =
        new VerboseConfig("REPLICATIONMGR_CONNFAIL", DbConstants.DB_VERB_REPMGR_CONNFAIL);
    /**
    Display detailed information about genereal Replication Manager processing.
    */
    public static final VerboseConfig REPMGR_MISC =
        new VerboseConfig("REPLICATIONMGR_MISC", DbConstants.DB_VERB_REPMGR_MISC);
    /**
    Display detailed information about replication elections.
    */
    public static final VerboseConfig REPLICATION_ELECTION =
        new VerboseConfig("REPLICATION_ELECTION", DbConstants.DB_VERB_REP_ELECT);
    /**
    Display detailed information about replication master leases.
    */
    public static final VerboseConfig REPLICATION_LEASE =
        new VerboseConfig("REPLICATION_LEASE", DbConstants.DB_VERB_REP_LEASE);
    /**
    Display detailed information about general replication processing not
    covered by the other REPLICATION_* values.
    */
    public static final VerboseConfig REPLICATION_MISC =
        new VerboseConfig("REPLICATION_MISC", DbConstants.DB_VERB_REP_MISC);
    /**
    Display detailed information about replication message processing.
    */
    public static final VerboseConfig REPLICATION_MSGS =
        new VerboseConfig("REPLICATION_MSGS", DbConstants.DB_VERB_REP_MSGS);
    /**
    Display detailed information about replication client synchronization.
    */
    public static final VerboseConfig REPLICATION_SYNC =
        new VerboseConfig("REPLICATION_SYNC", DbConstants.DB_VERB_REP_SYNC);
    /**
    Saves replication system information to a system-owned file. This value is on by default.
    */
    public static final VerboseConfig REPLICATION_SYSTEM =
        new VerboseConfig("REPLICATION_SYSTEM", DbConstants.DB_VERB_REP_SYSTEM);
    /**
    Display temporary replication test information.
    */
    public static final VerboseConfig REPLICATION_TEST =
        new VerboseConfig("REPLICATION_TEST", DbConstants.DB_VERB_REP_TEST);
    /**
    Display the waits-for table when doing deadlock detection.
    */
    public static final VerboseConfig WAITSFOR =
        new VerboseConfig("WAITSFOR", DbConstants.DB_VERB_WAITSFOR);

    /* Package */
    int getInternalFlag() {
        return verboseFlag;
    }
    /* For toString */
    private String verboseName;
    private int verboseFlag;

    private VerboseConfig(final String verboseName, int verboseFlag) {
        this.verboseName = verboseName;
        this.verboseFlag = verboseFlag;
    }

    /** {@inheritDoc} */
    public String toString() {
        return "VerboseConfig." + verboseName;
    }
}