feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
56
jdkSrc/jdk8/sun/jvmstat/monitor/event/HostEvent.java
Normal file
56
jdkSrc/jdk8/sun/jvmstat/monitor/event/HostEvent.java
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.EventObject;
|
||||
import sun.jvmstat.monitor.MonitoredHost;
|
||||
|
||||
/**
|
||||
* Base class for events emitted by a {@link MonitoredHost}.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
*/
|
||||
public class HostEvent extends EventObject {
|
||||
|
||||
/**
|
||||
* Construct a new HostEvent instance.
|
||||
*
|
||||
* @param host the MonitoredHost source of the event.
|
||||
*/
|
||||
public HostEvent(MonitoredHost host) {
|
||||
super(host);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the MonitoredHost source of this event.
|
||||
*
|
||||
* @return MonitoredHost - the source of this event.
|
||||
*/
|
||||
public MonitoredHost getMonitoredHost() {
|
||||
return (MonitoredHost)source;
|
||||
}
|
||||
}
|
||||
53
jdkSrc/jdk8/sun/jvmstat/monitor/event/HostListener.java
Normal file
53
jdkSrc/jdk8/sun/jvmstat/monitor/event/HostListener.java
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
/**
|
||||
* Interface for listeners of MonitoredHost events.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
* @see sun.jvmstat.monitor.MonitoredHost
|
||||
*/
|
||||
public interface HostListener extends EventListener {
|
||||
|
||||
/**
|
||||
* Invoked when the status of Java Virtual Machine changes.
|
||||
*
|
||||
* @param event the object describing the event.
|
||||
*/
|
||||
void vmStatusChanged(VmStatusChangeEvent event);
|
||||
|
||||
/**
|
||||
* Invoked when the connection to the MonitoredHost has disconnected
|
||||
* due to communication errors.
|
||||
*
|
||||
* @param event the object describing the event.
|
||||
*/
|
||||
void disconnected(HostEvent event);
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.List;
|
||||
import sun.jvmstat.monitor.MonitoredVm;
|
||||
|
||||
/**
|
||||
* Provides a description of a change in status of the instrumentation
|
||||
* exported by the MonitoredVm.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
*/
|
||||
public class MonitorStatusChangeEvent extends VmEvent {
|
||||
|
||||
/**
|
||||
* List of instrumentation objects inserted since the last event.
|
||||
* Elements of this list will always be of type Monitor.
|
||||
*/
|
||||
protected List inserted;
|
||||
|
||||
/**
|
||||
* List of instrumentation objects removed since the last event.
|
||||
* Elements of this list will always be of type Monitor.
|
||||
*/
|
||||
protected List removed;
|
||||
|
||||
/**
|
||||
* Construct a new MonitorStatusChangeEvent.
|
||||
*
|
||||
* @param vm the MonitoredVm source of the event.
|
||||
* @param inserted the list of instrumentation objects inserted since
|
||||
* the last event.
|
||||
* @param removed the list of instrumentation objects removed since
|
||||
* the last event.
|
||||
*/
|
||||
public MonitorStatusChangeEvent(MonitoredVm vm, List inserted,
|
||||
List removed) {
|
||||
super(vm);
|
||||
this.inserted = inserted;
|
||||
this.removed = removed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of instrumentation objects that were inserted
|
||||
* since the last event notification.
|
||||
*
|
||||
* @return List - a List of Monitor objects that were inserted into the
|
||||
* instrumentation exported by the MonitoredHost. If no
|
||||
* new instrumentation was inserted, an emply List is
|
||||
* returned.
|
||||
*/
|
||||
public List getInserted() {
|
||||
return inserted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the set of instrumentation objects that were removed
|
||||
* since the last event notification.
|
||||
*
|
||||
* @return List - a List of Monitor objects that were removed from the
|
||||
* instrumentation exported by the MonitoredHost. If no
|
||||
* instrumentation was removed, an emply List is returned.
|
||||
*/
|
||||
public List getRemoved() {
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
56
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmEvent.java
Normal file
56
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmEvent.java
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.EventObject;
|
||||
import sun.jvmstat.monitor.MonitoredVm;
|
||||
|
||||
/**
|
||||
* Base class for events emitted by a {@link MonitoredVm}.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
*/
|
||||
public class VmEvent extends EventObject {
|
||||
|
||||
/**
|
||||
* Construct a new VmEvent instance.
|
||||
*
|
||||
* @param vm the MonitoredVm source of the event.
|
||||
*/
|
||||
public VmEvent(MonitoredVm vm) {
|
||||
super(vm);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the MonitoredVm source of this event.
|
||||
*
|
||||
* @return MonitoredVm - the source of this event.
|
||||
*/
|
||||
public MonitoredVm getMonitoredVm() {
|
||||
return (MonitoredVm)source;
|
||||
}
|
||||
}
|
||||
63
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmListener.java
Normal file
63
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmListener.java
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
/**
|
||||
* Interface for listeners of MonitoredVm events.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
* @see sun.jvmstat.monitor.MonitoredVm
|
||||
*/
|
||||
public interface VmListener extends EventListener {
|
||||
|
||||
/**
|
||||
* Invoked when instrumentation objects are inserted into or removed
|
||||
* from the MonitoredVm.
|
||||
*
|
||||
* @param event the object describing the event.
|
||||
*/
|
||||
void monitorStatusChanged(MonitorStatusChangeEvent event);
|
||||
|
||||
/**
|
||||
* Invoked when instrumentation objects are updated. This event is
|
||||
* generated at a fixed interval as determined by the polling rate
|
||||
* of the MonitoredVm that the VmListener is registered with.
|
||||
*
|
||||
* @param event the object describing the event.
|
||||
*/
|
||||
void monitorsUpdated(VmEvent event);
|
||||
|
||||
/**
|
||||
* Invoked when the connection to the MonitoredVm has disconnected
|
||||
* due to communication errors.
|
||||
*
|
||||
* @param event the object describing the event.
|
||||
*/
|
||||
void disconnected(VmEvent event);
|
||||
}
|
||||
125
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmStatusChangeEvent.java
Normal file
125
jdkSrc/jdk8/sun/jvmstat/monitor/event/VmStatusChangeEvent.java
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.jvmstat.monitor.event;
|
||||
|
||||
import java.util.Set;
|
||||
import sun.jvmstat.monitor.MonitoredHost;
|
||||
|
||||
/**
|
||||
* Provides a description of a change in status of the Java Virtual Machines
|
||||
* associated with a MonitoredHost.
|
||||
*
|
||||
* @author Brian Doherty
|
||||
* @since 1.5
|
||||
*/
|
||||
public class VmStatusChangeEvent extends HostEvent {
|
||||
|
||||
/**
|
||||
* The set of currently active Java Virtual Machines for the MonitoredHost.
|
||||
* The set contains an Integer object holding the <em>lvmid</em> for each
|
||||
* active Java Virtual Machine on the MonitoredHost. This Set will only
|
||||
* contain Integer objects.
|
||||
*/
|
||||
protected Set active;
|
||||
|
||||
/**
|
||||
* The set of Java Virtual Machines started on MonitoredHost since the
|
||||
* previous event. The set contains an Integer object holding the
|
||||
* <em>lvmid</em> for each Java Virtual Machine started on the
|
||||
* MonitoredHost. This Set will only contain Integer objects.
|
||||
*/
|
||||
protected Set started;
|
||||
|
||||
/**
|
||||
* The set of Java Virtual Machines terminated on MonitoredHost since the
|
||||
* previous event. The set contains an Integer object holding the
|
||||
* <em>lvmid</em> for each Java Virtual Machine started on the
|
||||
* MonitoredHost. This Set will only contain Integer objects.
|
||||
*/
|
||||
protected Set terminated;
|
||||
|
||||
/**
|
||||
* Construct a new VmStatusChangeEvent instance.
|
||||
*
|
||||
* @param host the MonitoredHost that is the source of the event.
|
||||
* @param active the set of currently active Java Virtual Machines
|
||||
* @param started the set of Java Virtual Machines started since the
|
||||
* last event.
|
||||
* @param terminated the set of Java Virtual Machines terminated since
|
||||
* the last event.
|
||||
*/
|
||||
public VmStatusChangeEvent(MonitoredHost host, Set active,
|
||||
Set started, Set terminated) {
|
||||
super(host);
|
||||
this.active = active;
|
||||
this.started = started;
|
||||
this.terminated = terminated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the set of currently active Java Virtual Machines.
|
||||
* The set contains an Integer object holding the <em>lvmid</em> for each
|
||||
* active Java Virtual Machine on the MonitoredHost.
|
||||
*
|
||||
* @return Set - a set of Integer objects containing the <em>lvmid</em>
|
||||
* of each active Java Virtual Machine on the host. If
|
||||
* there are no active Java Virtual Machines on the host,
|
||||
* an empty Set is returned.
|
||||
*/
|
||||
public Set getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the set of Java Virtual Machines started since the last
|
||||
* event notification. The set contains an Integer object holding
|
||||
* the <em>lvmid</em> for each Java Virtual Machine started on the
|
||||
* MonitoredHost since the last event notification.
|
||||
*
|
||||
* @return Set - a set of Integer objects containing the <em>lvmid</em>
|
||||
* of each Java Virtual Machine started on the host. If
|
||||
* no Java Virtual Machines were recently started on the
|
||||
* host, an empty Set is returned.
|
||||
*/
|
||||
public Set getStarted() {
|
||||
return started;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the set of Java Virtual Machines terminated since the last
|
||||
* event notification. The set contains an Integer object holding
|
||||
* the <em>lvmid</em> for each Java Virtual Machine terminated on the
|
||||
* MonitoredHost since the last event notification.
|
||||
*
|
||||
* @return Set - a set of Integer objects containing the <em>lvmid</em>
|
||||
* of each Java Virtual Machine terminated on the host. If
|
||||
* no Java Virtual Machines were recently terminated on the
|
||||
* host, an empty Set is returned.
|
||||
*/
|
||||
public Set getTerminated() {
|
||||
return terminated;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user