jdk/test/javax/management/monitor/CounterMonitorDeadlockTest.java
author coleenp
Wed, 17 Jun 2015 21:44:48 +0000
changeset 31362 8957ccbb5821
parent 30376 2ccf2cf7ea48
child 44423 306c020eb154
permissions -rw-r--r--
8098821: Crash in system dictionary initialization with shared strings Summary: map string regions after the compressed class base is known Reviewed-by: iklam, dcubed Contributed-by: coleen.phillimore@oracle.com, mikhailo.seledtsov@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
28404
ca8570ff2a87 8068774: CounterMonitorDeadlockTest.java timed out
sjiang
parents: 24250
diff changeset
     2
 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 6303187
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Test that no locks are held when a monitor attribute is sampled
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * or notif delivered.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * @author Eamonn McManus
30376
2ccf2cf7ea48 8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents: 28404
diff changeset
    30
 * @modules java.management
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * @run clean CounterMonitorDeadlockTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * @run build CounterMonitorDeadlockTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * @run main CounterMonitorDeadlockTest 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * @run main CounterMonitorDeadlockTest 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * @run main CounterMonitorDeadlockTest 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @run main CounterMonitorDeadlockTest 4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.lang.management.ManagementFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.util.concurrent.atomic.AtomicInteger;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import javax.management.JMX;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import javax.management.MBeanServer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import javax.management.Notification;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import javax.management.NotificationListener;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import javax.management.ObjectName;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import javax.management.monitor.CounterMonitor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
import javax.management.monitor.CounterMonitorMBean;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
public class CounterMonitorDeadlockTest {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    public static void main(String[] args) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
        if (args.length != 1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
            throw new Exception("Arg should be test number");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
        int testNo = Integer.parseInt(args[0]) - 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        TestCase test = testCases[testNo];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        System.out.println("Test: " + test.getDescription());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        test.run();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        System.out.println("Test passed");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    private static enum When {IN_GET_ATTRIBUTE, IN_NOTIFY};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    private static abstract class TestCase {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        TestCase(String description, When when) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
            this.description = description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
            this.when = when;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        void run() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
            final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
            final ObjectName observedName = new ObjectName("a:b=c");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
            final ObjectName monitorName = new ObjectName("a:type=Monitor");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            mbs.registerMBean(new CounterMonitor(), monitorName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            final CounterMonitorMBean monitorProxy =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                JMX.newMBeanProxy(mbs, monitorName, CounterMonitorMBean.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
            final TestMBean observedProxy =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
                JMX.newMBeanProxy(mbs, observedName, TestMBean.class);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            final Runnable sensitiveThing = new Runnable() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                    doSensitiveThing(monitorProxy, observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            };
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            final Runnable nothing = new Runnable() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                public void run() {}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            };
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
            final Runnable withinGetAttribute =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
                (when == When.IN_GET_ATTRIBUTE) ? sensitiveThing : nothing;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            mbs.registerMBean(new Test(withinGetAttribute), observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
            monitorProxy.addObservedObject(observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
            monitorProxy.setObservedAttribute("Thing");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
            monitorProxy.setInitThreshold(100);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
            monitorProxy.setGranularityPeriod(10L); // 10 ms
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
            monitorProxy.setNotify(true);
28404
ca8570ff2a87 8068774: CounterMonitorDeadlockTest.java timed out
sjiang
parents: 24250
diff changeset
    98
ca8570ff2a87 8068774: CounterMonitorDeadlockTest.java timed out
sjiang
parents: 24250
diff changeset
    99
            final int initGetCount = observedProxy.getGetCount();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
            monitorProxy.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
24250
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   102
            System.out.println("Checking GetCount, possible deadlock if timeout.");
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   103
            do { // 8038322. Until timeout of testing harness
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   104
                Thread.sleep(200);
28404
ca8570ff2a87 8068774: CounterMonitorDeadlockTest.java timed out
sjiang
parents: 24250
diff changeset
   105
            } while ((observedProxy.getGetCount()) == initGetCount);
24250
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   106
            System.out.println("Done!");
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   107
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            // This won't show up as a deadlock in CTRL-\ or in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            // ThreadMXBean.findDeadlockedThreads(), because they don't
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
            // see that thread A is waiting for thread B (B.join()), and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            // thread B is waiting for a lock held by thread A
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
            // Now we know the monitor has observed the initial value,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
            // so if we want to test notify behaviour we can trigger by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            // exceeding the threshold.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            if (when == When.IN_NOTIFY) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
                final AtomicInteger notifCount = new AtomicInteger();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
                final NotificationListener listener = new NotificationListener() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                    public void handleNotification(Notification n, Object h) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                        Thread t = new Thread(sensitiveThing);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                        t.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
                        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                            t.join();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                        } catch (InterruptedException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                            throw new RuntimeException(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                        notifCount.incrementAndGet();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
                };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
                mbs.addNotificationListener(monitorName, listener, null, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                observedProxy.setThing(1000);
24250
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   132
                System.out.println("Waiting notifCount.get() != 0, possible deadlock if timeout.");
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   133
                do {
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   134
                    Thread.sleep(200);
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   135
                } while(notifCount.get() == 0); // 8038322. Until timeout of testing harness
0e2a906a043d 8031036: com/sun/management/OperatingSystemMXBean/GetCommittedVirtualMemorySize.java failed on 8b121
sjiang
parents: 5506
diff changeset
   136
                System.out.println("Done");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        abstract void doSensitiveThing(CounterMonitorMBean monitorProxy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                                       ObjectName observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        String getDescription() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            return description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        private final String description;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        private final When when;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    private static final TestCase[] testCases = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        new TestCase("Remove monitored MBean within monitored getAttribute",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
                     When.IN_GET_ATTRIBUTE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
            void doSensitiveThing(CounterMonitorMBean monitorProxy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                                  ObjectName observedName) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                monitorProxy.removeObservedObject(observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        },
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        new TestCase("Stop monitor within monitored getAttribute",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                     When.IN_GET_ATTRIBUTE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
            @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            void doSensitiveThing(CounterMonitorMBean monitorProxy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                                  ObjectName observedName) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                monitorProxy.stop();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        },
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        new TestCase("Remove monitored MBean within threshold listener",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                     When.IN_NOTIFY) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            void doSensitiveThing(CounterMonitorMBean monitorProxy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                                  ObjectName observedName) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                monitorProxy.removeObservedObject(observedName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        },
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        new TestCase("Stop monitor within threshold listener",
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                     When.IN_NOTIFY) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
            @Override
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            void doSensitiveThing(CounterMonitorMBean monitorProxy,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                                  ObjectName observedName) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                monitorProxy.stop();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        },
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    public static interface TestMBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
        public int getThing();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        public void setThing(int thing);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
        public int getGetCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    public static class Test implements TestMBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        public Test(Runnable runWithinGetAttribute) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
            this.runWithinGetAttribute = runWithinGetAttribute;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        public int getThing() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            Thread t = new Thread(runWithinGetAttribute);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
            t.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                t.join();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            } catch (InterruptedException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                throw new RuntimeException(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
            getCount++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
            return thing;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        public void setThing(int thing) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
            this.thing = thing;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        public int getGetCount() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
            return getCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        private final Runnable runWithinGetAttribute;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        private volatile int getCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        private volatile int thing;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
}