-
Notifications
You must be signed in to change notification settings - Fork 33
/
BrokerConstants.java
135 lines (121 loc) · 5.74 KB
/
BrokerConstants.java
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
127
128
129
130
131
132
133
134
135
/*
* Copyright (c) 2000, 2017 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package com.sun.messaging.jmq.admin.bkrutil;
import java.util.List;
/**
* Interface containing constants related to broker administration.
*
* This currently holds property names that are shared/common across all broker admin tools.
*/
public interface BrokerConstants {
/*
* Property names for broker attributes
*
*/
String PROP_NAME_BKR_INSTANCE_NAME = "imq.instancename";
String PROP_NAME_BKR_PRIMARY_PORT = "imq.portmapper.port";
String PROP_NAME_BKR_AUTOCREATE_TOPIC = "imq.autocreate.topic";
String PROP_NAME_BKR_AUTOCREATE_QUEUE = "imq.autocreate.queue";
String PROP_NAME_BKR_QUEUE_DELIVERY_POLICY = "imq.queue.deliverypolicy";
String PROP_NAME_BKR_LOG_LEVEL = ".level";
String PROP_NAME_BKR_LOG_ROLL_SIZE = "java.util.logging.FileHandler.limit";
String PROP_NAME_BKR_LOG_ROLL_INTERVAL = "imq.log.file.rolloversecs";
/*
* public static String PROP_NAME_BKR_METRIC_INTERVAL = "imq.metrics.interval";
*/
String PROP_NAME_BKR_MAX_MSG = "imq.system.max_count";
String PROP_NAME_BKR_MAX_TTL_MSG_BYTES = "imq.system.max_size";
String PROP_NAME_BKR_MAX_MSG_BYTES = "imq.message.max_size";
String PROP_NAME_BKR_CUR_MSG = "imq.system.current_count";
String PROP_NAME_BKR_CUR_TTL_MSG_BYTES = "imq.system.current_size";
String PROP_NAME_BKR_CLS_BKRLIST = "imq.cluster.brokerlist";
String PROP_NAME_BKR_CLS_BKRLIST_ACTIVE = "imq.cluster.brokerlist.active";
String PROP_NAME_BKR_CLS_CFG_SVR = "imq.cluster.masterbroker";
String PROP_NAME_BKR_CLS_URL = "imq.cluster.url";
String PROP_NAME_BKR_CLS_CLUSTER_ID = "imq.cluster.clusterid";
String PROP_NAME_BKR_CLS_HA = "imq.cluster.ha";
String PROP_NAME_BKR_STORE_MIGRATABLE = "imq.storemigratable";
String PROP_NAME_BKR_PARTITION_MIGRATABLE = "imq.partitionmigratable";
String PROP_NAME_BKR_CLS_BROKER_ID = "imq.brokerid";
String PROP_NAME_BKR_PRODUCT_VERSION = "imq.product.version";
String PROP_NAME_BKR_AUTOCREATE_QUEUE_MAX_ACTIVE_CONS = "imq.autocreate.queue.maxNumActiveConsumers";
String PROP_NAME_BKR_AUTOCREATE_QUEUE_MAX_BACKUP_CONS = "imq.autocreate.queue.maxNumBackupConsumers";
String PROP_NAME_BKR_LOG_DEAD_MSGS = "imq.destination.logDeadMsgs";
String PROP_NAME_BKR_DMQ_TRUNCATE_MSG_BODY = "imq.destination.DMQ.truncateBody";
String PROP_NAME_BKR_AUTOCREATE_DESTINATION_USE_DMQ = "imq.autocreate.destination.useDMQ";
String PROP_NAME_BKR_IS_EMBEDDED = "imq.embedded";
String PROP_NAME_BKR_VARHOME = "imq.varhome";
String PROP_NAME_BKR_LICENSE_DESC = "imq.license.description";
String PROP_NAME_DMQ_CUR_MSG = "imq.dmq.current_count";
String PROP_NAME_DMQ_CUR_TTL_MSG_BYTES = "imq.dmq.current_size";
/*
* Property names returned in Hashtables for GET_TRANSACTION admin message
*/
String PROP_NAME_TXN_ID = "txnid";
String PROP_NAME_TXN_XID = "xid";
String PROP_NAME_TXN_NUM_MSGS = "nmsgs";
String PROP_NAME_TXN_NUM_ACKS = "nacks";
String PROP_NAME_TXN_USER = "user";
String PROP_NAME_TXN_CLIENTID = "clientid";
String PROP_NAME_TXN_TIMESTAMP = "timestamp";
String PROP_NAME_TXN_CONNECTION = "connection";
String PROP_NAME_TXN_CONNECTION_ID = "connectionid";
String PROP_NAME_TXN_STATE = "state";
/*
* Property names returned in Hashtables in GET_CONNECTIONS admin message
*/
String PROP_NAME_CXN_CXN_ID = "cxnid";
String PROP_NAME_CXN_CLIENT_ID = "clientid";
String PROP_NAME_CXN_HOST = "host";
String PROP_NAME_CXN_PORT = "port";
String PROP_NAME_CXN_USER = "user";
String PROP_NAME_CXN_NUM_PRODUCER = "nproducers";
String PROP_NAME_CXN_NUM_CONSUMER = "nconsumers";
String PROP_NAME_CXN_CLIENT_PLATFORM = "clientplatform";
String PROP_NAME_CXN_SERVICE = "service";
/*
* Property names returned in Hashtables in GET_JMX admin message
*/
String PROP_NAME_JMX_NAME = "name";
String PROP_NAME_JMX_ACTIVE = "active";
String PROP_NAME_JMX_URL = "url";
/*
* Valid values for broker log level.
*/
List<String> BKR_LOG_LEVEL_VALID_VALUES = List.of("NONE", "ERROR", "WARNING", "INFO");
/*
* Queue flavour property names, as expected by the broker
*/
String PROP_NAME_QUEUE_FLAVOUR_SINGLE = "single";
String PROP_NAME_QUEUE_FLAVOUR_FAILOVER = "failover";
String PROP_NAME_QUEUE_FLAVOUR_ROUNDROBIN = "round-robin";
/*
* Valid values for broker log level. Note: Indices for the strings below need to match the array contents.
*/
List<String> BKR_LIMIT_BEHAV_VALID_VALUES = List.of("FLOW_CONTROL", "REMOVE_OLDEST", "REJECT_NEWEST", "REMOVE_LOW_PRIORITY");
String LIMIT_BEHAV_FLOW_CONTROL = BKR_LIMIT_BEHAV_VALID_VALUES.get(0);
String LIMIT_BEHAV_RM_OLDEST = BKR_LIMIT_BEHAV_VALID_VALUES.get(1);
String LIMIT_BEHAV_REJECT_NEWEST = BKR_LIMIT_BEHAV_VALID_VALUES.get(2);
String LIMIT_BEHAV_RM_LOW_PRIORITY = BKR_LIMIT_BEHAV_VALID_VALUES.get(3);
/*
* Transaction types
*/
int TXN_LOCAL = 0;
int TXN_CLUSTER = 1;
int TXN_REMOTE = 2;
int TXN_UNKNOWN = -1;
}