tibems 0.0.2-java → 0.0.3-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd6d3099d869e484d150441df309c585b7dcd6e8
4
- data.tar.gz: b5fd1c0569158c8b4ae0ddb5671d56b2c4cdc61d
3
+ metadata.gz: a2065e2c0af492061347a77729d62f75f3d2eba4
4
+ data.tar.gz: 903dc4188f9db32628f9e850196501517a68ce21
5
5
  SHA512:
6
- metadata.gz: 88c224d9aa6a18ebdd37e569014fa46e67440f09f44af04cc9d5938dc24fb400e082ddeac9d4a987487bbd268113b8730b1ebf3b41485647da4a228ad8c2c4d6
7
- data.tar.gz: 4f37ea6a8b4c740b4d77c2087872dd1749fadfd1388dc7a656fcaeaf6bf5181ee4666d914652cc50b79ab9865852e967425acc641726ff6e7e82cf3d42c2fdcb
6
+ metadata.gz: 327e7fdf342f45b874db065221947be921f991ec6d55460248d843a6c6cbe98220f6d3f02704f3dce400d7faaf920c8df4cf89a22f07fa950b32462bf7953dc0
7
+ data.tar.gz: d624e4e54e255987e0bcea93c94f05f3f0789647f906ad4ee5c4d7fd0b6dd3565d139db3a738f2e9ddc1666def9421f5a5fda47a8245a4c982dbb70f5d82e26c
@@ -50,21 +50,23 @@ public class Admin extends RubyObject {
50
50
  }
51
51
 
52
52
  @JRubyMethod(name = "create")
53
- protected static IRubyObject create(ThreadContext context, IRubyObject self, RubyString url, RubyString user, RubyString pass) {
53
+ protected static IRubyObject create(ThreadContext context, IRubyObject self, RubyString url, RubyString user, RubyString pass) throws TibjmsAdminException {
54
54
  try {
55
55
  admin = new TibjmsAdmin(url.asJavaString(),user.asJavaString(),pass.asJavaString());
56
56
  } catch (TibjmsAdminException exp) {
57
+ throw exp;
57
58
  }
58
59
 
59
60
  return self;
60
61
  }
61
62
 
62
63
  @JRubyMethod(name = "close")
63
- public IRubyObject close(ThreadContext context) {
64
+ public IRubyObject close(ThreadContext context) throws TibjmsAdminException {
64
65
  try {
65
66
  admin.close();
66
67
  admin = null;
67
68
  } catch (TibjmsAdminException exp) {
69
+ throw exp;
68
70
  }
69
71
  return Qnil;
70
72
  }
@@ -78,22 +80,31 @@ public class Admin extends RubyObject {
78
80
  RubyHash outbound = RubyHash.newHash( runtime );
79
81
 
80
82
  dest.put("name",destInfo.getName());
83
+
81
84
  dest.put("consumerCount", destInfo.getConsumerCount());
85
+
82
86
  dest.put("flowControlMaxBytes", destInfo.getFlowControlMaxBytes());
87
+
88
+ dest.put("maxBytes", destInfo.getMaxBytes());
89
+ dest.put("maxMsgs", destInfo.getMaxMsgs());
90
+
83
91
  dest.put("pendingMessageCount", destInfo.getPendingMessageCount());
84
92
  dest.put("pendingMessageSize", destInfo.getPendingMessageSize());
85
93
 
94
+ dest.put("pendingPersistentMessageCount", destInfo.getPendingPersistentMessageCount());
95
+ dest.put("pendingPersistentMessageSize", destInfo.getPendingPersistentMessageSize());
96
+
86
97
  if (type == DESTINATION_TYPE_TOPIC) {
87
98
  TopicInfo topicInfo = (TopicInfo)destInfo;
88
- dest.put("subscriberCount", topicInfo.getSubscriberCount());
89
- dest.put("durableCount", topicInfo.getDurableCount());
90
99
  dest.put("activeDurableCount", topicInfo.getActiveDurableCount());
100
+ dest.put("durableCount", topicInfo.getDurableCount());
101
+ dest.put("subscriberCount", topicInfo.getSubscriberCount());
91
102
  } else {
92
103
  QueueInfo queueInfo = (QueueInfo)destInfo;
93
- dest.put("receiverCount", queueInfo.getReceiverCount());
94
104
  dest.put("deliveredMessageCount", queueInfo.getDeliveredMessageCount());
95
105
  dest.put("inTransitMessageCount", queueInfo.getInTransitMessageCount());
96
106
  dest.put("maxRedelivery", queueInfo.getMaxRedelivery());
107
+ dest.put("receiverCount", queueInfo.getReceiverCount());
97
108
  }
98
109
 
99
110
  StatData inboundStats = destInfo.getInboundStatistics();
@@ -119,39 +130,39 @@ public class Admin extends RubyObject {
119
130
  }
120
131
 
121
132
  @JRubyMethod(name = "get_info")
122
- public IRubyObject get_info(ThreadContext context) {
133
+ public IRubyObject get_info(ThreadContext context) throws TibjmsAdminException {
123
134
  Ruby runtime = context.runtime;
124
135
  RubyHash info = RubyHash.newHash( runtime );
125
136
 
126
137
  try {
127
138
  ServerInfo serverInfo = admin.getInfo();
128
139
 
129
- info.put("diskReadRate", serverInfo.getDiskReadRate());
130
- info.put("diskWriteRate", serverInfo.getDiskWriteRate());
131
- info.put("syncDBSize", serverInfo.getSyncDBSize());
132
140
  info.put("asyncDBSize", serverInfo.getAsyncDBSize());
133
- info.put("msgMem", serverInfo.getMsgMem());
134
- info.put("msgMemPooled", serverInfo.getMsgMemPooled());
135
- info.put("maxMsgMemory", serverInfo.getMaxMsgMemory());
136
- info.put("msgMem", serverInfo.getMsgMem());
137
141
  info.put("connectionCount", serverInfo.getConnectionCount());
138
- info.put("maxConnections", serverInfo.getMaxConnections());
139
- info.put("sessionCount", serverInfo.getSessionCount());
140
- info.put("producerCount", serverInfo.getProducerCount());
141
142
  info.put("consumerCount", serverInfo.getConsumerCount());
143
+ info.put("diskReadOperationsRate", serverInfo.getDiskReadOperationsRate());
144
+ info.put("diskReadRate", serverInfo.getDiskReadRate());
145
+ info.put("diskWriteOperationsRate", serverInfo.getDiskWriteOperationsRate());
146
+ info.put("diskWriteRate", serverInfo.getDiskWriteRate());
142
147
  info.put("durableCount", serverInfo.getDurableCount());
143
- info.put("topicCount", serverInfo.getTopicCount());
144
- info.put("queueCount", serverInfo.getQueueCount());
145
- info.put("pendingMessageCount", serverInfo.getPendingMessageCount());
146
- info.put("pendingMessageSize", serverInfo.getPendingMessageSize());
148
+ info.put("inboundBytesRate", serverInfo.getInboundBytesRate());
147
149
  info.put("inboundMessageCount", serverInfo.getInboundMessageCount());
148
150
  info.put("inboundMessageRate", serverInfo.getInboundMessageRate());
149
- info.put("inboundBytesRate", serverInfo.getInboundBytesRate());
151
+ info.put("maxConnections", serverInfo.getMaxConnections());
152
+ info.put("maxMsgMemory", serverInfo.getMaxMsgMemory());
153
+ info.put("msgMem", serverInfo.getMsgMem());
154
+ info.put("msgMemPooled", serverInfo.getMsgMemPooled());
155
+ info.put("outboundBytesRate", serverInfo.getOutboundBytesRate());
150
156
  info.put("outboundMessageCount", serverInfo.getOutboundMessageCount());
151
157
  info.put("outboundMessageRate", serverInfo.getOutboundMessageRate());
152
- info.put("outboundBytesRate", serverInfo.getOutboundBytesRate());
153
- info.put("logFileMaxSize", serverInfo.getLogFileMaxSize());
154
- info.put("logFileSize", serverInfo.getLogFileSize());
158
+ info.put("pendingMessageCount", serverInfo.getPendingMessageCount());
159
+ info.put("pendingMessageSize", serverInfo.getPendingMessageSize());
160
+ info.put("producerCount", serverInfo.getProducerCount());
161
+ info.put("queueCount", serverInfo.getQueueCount());
162
+ info.put("reserveMemory", serverInfo.getReserveMemory());
163
+ info.put("sessionCount", serverInfo.getSessionCount());
164
+ info.put("syncDBSize", serverInfo.getSyncDBSize());
165
+ info.put("topicCount", serverInfo.getTopicCount());
155
166
 
156
167
  // TODO: pass pattern
157
168
  QueueInfo[] queueInfos = admin.getQueuesStatistics();
@@ -172,6 +183,7 @@ public class Admin extends RubyObject {
172
183
  }
173
184
 
174
185
  } catch (TibjmsAdminException exp) {
186
+ throw exp;
175
187
  }
176
188
 
177
189
  return info;
Binary file
@@ -1,3 +1,3 @@
1
1
  module TibEMS
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tibems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: java
6
6
  authors:
7
7
  - Justo Alonso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement