summaryrefslogtreecommitdiff
path: root/java/test/Ice/metrics/ObserverI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Ice/metrics/ObserverI.java')
-rw-r--r--java/test/Ice/metrics/ObserverI.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/java/test/Ice/metrics/ObserverI.java b/java/test/Ice/metrics/ObserverI.java
new file mode 100644
index 00000000000..46ec62a275b
--- /dev/null
+++ b/java/test/Ice/metrics/ObserverI.java
@@ -0,0 +1,42 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package test.Ice.metrics;
+
+class ObserverI implements Ice.Instrumentation.Observer
+{
+ synchronized public void
+ reset()
+ {
+ total = 0;
+ current = 0;
+ failedCount = 0;
+ }
+
+ synchronized public void
+ attach()
+ {
+ ++total;
+ ++current;
+ }
+ synchronized public void
+ detach()
+ {
+ --current;
+ }
+ synchronized public void
+ failed(String s)
+ {
+ ++failedCount;
+ }
+
+ int total;
+ int current;
+ int failedCount;
+};