src/java.management/share/classes/javax/management/MBeanServerDelegate.java
author darcy
Wed, 23 Oct 2019 13:01:40 -0700
changeset 58766 54ffb15c4839
parent 47216 71c04702a3d5
permissions -rw-r--r--
8232442: Suppress warnings on non-serializable non-transient instance fields in java.management.* Reviewed-by: rriggs, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
43235
da1786d695b6 8172971: java.management could use System.Logger
dfuchs
parents: 25859
diff changeset
     2
 * Copyright (c) 1999, 2017, 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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.management;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
43235
da1786d695b6 8172971: java.management could use System.Logger
dfuchs
parents: 25859
diff changeset
    28
import java.lang.System.Logger.Level;
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 2
diff changeset
    29
import com.sun.jmx.defaults.JmxProperties;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import com.sun.jmx.defaults.ServiceName;
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 2
diff changeset
    31
import com.sun.jmx.mbeanserver.Util;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * Represents  the MBean server from the management point of view.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * The MBeanServerDelegate MBean emits the MBeanServerNotifications when
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * an MBean is registered/unregistered in the MBean server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
public class MBeanServerDelegate implements MBeanServerDelegateMBean,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
                                            NotificationEmitter   {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    /** The MBean server agent identification.*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    private String mbeanServerId ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    /** The NotificationBroadcasterSupport object that sends the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        notifications */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    private final NotificationBroadcasterSupport broadcaster;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    private static long oldStamp = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    private final long stamp;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    private long sequenceNumber = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    private static final MBeanNotificationInfo[] notifsInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        final String[] types  = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
            MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
            MBeanServerNotification.REGISTRATION_NOTIFICATION
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        };
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        notifsInfo = new MBeanNotificationInfo[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        notifsInfo[0] =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            new MBeanNotificationInfo(types,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
                    "javax.management.MBeanServerNotification",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                    "Notifications sent by the MBeanServerDelegate MBean");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     * Create a MBeanServerDelegate object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    public MBeanServerDelegate () {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        stamp = getStamp();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        broadcaster = new NotificationBroadcasterSupport() ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * Returns the MBean server agent identity.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * @return the identity.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    public synchronized String getMBeanServerId() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        if (mbeanServerId == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            String localHost;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                localHost = java.net.InetAddress.getLocalHost().getHostName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            } catch (java.net.UnknownHostException e) {
43235
da1786d695b6 8172971: java.management could use System.Logger
dfuchs
parents: 25859
diff changeset
    88
                JmxProperties.MISC_LOGGER.log(Level.TRACE,
da1786d695b6 8172971: java.management could use System.Logger
dfuchs
parents: 25859
diff changeset
    89
                        "Can't get local host name, " +
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 2
diff changeset
    90
                        "using \"localhost\" instead. Cause is: "+e);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                localHost = "localhost";
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            }
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1247
diff changeset
    93
            mbeanServerId = localHost + "_" + stamp;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        return mbeanServerId;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * Returns the full name of the JMX specification implemented
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     * by this product.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * @return the specification name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    public String getSpecificationName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        return ServiceName.JMX_SPEC_NAME;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * Returns the version of the JMX specification implemented
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * by this product.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * @return the specification version.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    public String getSpecificationVersion() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        return ServiceName.JMX_SPEC_VERSION;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * Returns the vendor of the JMX specification implemented
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * by this product.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     * @return the specification vendor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    public String getSpecificationVendor() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        return ServiceName.JMX_SPEC_VENDOR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * Returns the JMX implementation name (the name of this product).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * @return the implementation name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    public String getImplementationName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        return ServiceName.JMX_IMPL_NAME;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * Returns the JMX implementation version (the version of this product).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * @return the implementation version.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    public String getImplementationVersion() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            return System.getProperty("java.runtime.version");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
        } catch (SecurityException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            return "";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * Returns the JMX implementation vendor (the vendor of this product).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * @return the implementation vendor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    public String getImplementationVendor()  {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        return ServiceName.JMX_IMPL_VENDOR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    // From NotificationEmitter extends NotificationBroacaster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    public MBeanNotificationInfo[] getNotificationInfo() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        final int len = MBeanServerDelegate.notifsInfo.length;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        final MBeanNotificationInfo[] infos =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        new MBeanNotificationInfo[len];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        System.arraycopy(MBeanServerDelegate.notifsInfo,0,infos,0,len);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        return infos;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    // From NotificationEmitter extends NotificationBroacaster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    public synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        void addNotificationListener(NotificationListener listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                                     NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                                     Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        throws IllegalArgumentException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        broadcaster.addNotificationListener(listener,filter,handback) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    // From NotificationEmitter extends NotificationBroacaster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    public synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        void removeNotificationListener(NotificationListener listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                                        NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                                        Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        throws ListenerNotFoundException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        broadcaster.removeNotificationListener(listener,filter,handback) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    // From NotificationEmitter extends NotificationBroacaster
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    public synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        void removeNotificationListener(NotificationListener listener)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        throws ListenerNotFoundException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        broadcaster.removeNotificationListener(listener) ;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * Enables the MBean server to send a notification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * If the passed <var>notification</var> has a sequence number lesser
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     * or equal to 0, then replace it with the delegate's own sequence
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
     * number.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * @param notification The notification to send.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    public void sendNotification(Notification notification) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        if (notification.getSequenceNumber() < 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
            synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                notification.setSequenceNumber(this.sequenceNumber++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        broadcaster.sendNotification(notification);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * Defines the default ObjectName of the MBeanServerDelegate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     */
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 2
diff changeset
   219
    public static final ObjectName DELEGATE_NAME =
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1247
diff changeset
   220
            Util.newObjectName("JMImplementation:type=MBeanServerDelegate");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    /* Return a timestamp that is monotonically increasing even if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
       System.currentTimeMillis() isn't (for example, if you call this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
       constructor more than once in the same millisecond, or if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
       clock always returns the same value).  This means that the ids
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
       for a given JVM will always be distinact, though there is no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
       such guarantee for two different JVMs.  */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    private static synchronized long getStamp() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        long s = System.currentTimeMillis();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        if (oldStamp >= s) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            s = oldStamp + 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        oldStamp = s;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        return s;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
}