< prev index next >

src/jdk.management.jfr/share/classes/jdk/management/jfr/RecordingInfo.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, 2018, 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 --- 1,7 ---- /* ! * Copyright (c) 2016, 2019, 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
*** 49,59 **** private final long id; private final String name; private final String state; private final boolean dumpOnExit; private final long size; ! private final boolean disk; private final long maxAge; private final long maxSize; private final long startTime; private final long stopTime; private final String destination; --- 49,59 ---- private final long id; private final String name; private final String state; private final boolean dumpOnExit; private final long size; ! private final boolean toDisk; private final long maxAge; private final long maxSize; private final long startTime; private final long stopTime; private final String destination;
*** 65,75 **** id = recording.getId(); name = recording.getName(); state = recording.getState().toString(); dumpOnExit = recording.getDumpOnExit(); size = recording.getSize(); ! disk = recording.isToDisk(); Duration d = recording.getMaxAge(); if (d == null) { maxAge = 0; } else { --- 65,75 ---- id = recording.getId(); name = recording.getName(); state = recording.getState().toString(); dumpOnExit = recording.getDumpOnExit(); size = recording.getSize(); ! toDisk = recording.isToDisk(); Duration d = recording.getMaxAge(); if (d == null) { maxAge = 0; } else {
*** 85,100 **** durationInSeconds = duration == null ? 0 : duration.getSeconds(); settings = recording.getSettings(); } private RecordingInfo(CompositeData cd) { ! id = (int) cd.get("id"); name = (String) cd.get("name"); state = (String) cd.get("state"); dumpOnExit = (boolean) cd.get("dumpOnExit"); size = (long) cd.get("size"); ! disk = (boolean) cd.get("disk"); maxAge = (Long) cd.get("maxAge"); maxSize = (Long) cd.get("maxSize"); startTime = (Long) cd.get("startTime"); stopTime = (Long) cd.get("stopTime"); destination = (String) cd.get("destination"); --- 85,105 ---- durationInSeconds = duration == null ? 0 : duration.getSeconds(); settings = recording.getSettings(); } private RecordingInfo(CompositeData cd) { ! id = (long) cd.get("id"); name = (String) cd.get("name"); state = (String) cd.get("state"); dumpOnExit = (boolean) cd.get("dumpOnExit"); size = (long) cd.get("size"); ! if(cd.containsKey("toDisk")){ ! toDisk = (boolean) cd.get("toDisk"); ! } else { ! // Before JDK-8219904 was fixed, the element name was disk, so for compatibility ! toDisk = (boolean) cd.get("disk"); ! } maxAge = (Long) cd.get("maxAge"); maxSize = (Long) cd.get("maxSize"); startTime = (Long) cd.get("startTime"); stopTime = (Long) cd.get("stopTime"); destination = (String) cd.get("destination");
*** 288,298 **** * full, {@code false} otherwise. * * @return {@code true} if recording is to disk, {@code false} otherwise */ public boolean isToDisk() { ! return disk; } /** * Returns the desired duration, measured in seconds, of the recording * associated with this {@link RecordingInfo}, or {code 0} if no duration --- 293,303 ---- * full, {@code false} otherwise. * * @return {@code true} if recording is to disk, {@code false} otherwise */ public boolean isToDisk() { ! return toDisk; } /** * Returns the desired duration, measured in seconds, of the recording * associated with this {@link RecordingInfo}, or {code 0} if no duration
*** 340,350 **** * <tr> * <th scope="row">size</th> * <td>{@code Long}</td> * </tr> * <tr> ! * <th scope="row">disk</th> * <td>{@code Boolean}</td> * </tr> * <tr> * <th scope="row">maxAge</th> * <td>{@code Long}</td> --- 345,355 ---- * <tr> * <th scope="row">size</th> * <td>{@code Long}</td> * </tr> * <tr> ! * <th scope="row">toDisk</th> * <td>{@code Boolean}</td> * </tr> * <tr> * <th scope="row">maxAge</th> * <td>{@code Long}</td>
< prev index next >