APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvmstat.perfdata.monitor.protocol.local

public Class PerfDataFile

extends Object
Class Inheritance
Imports
java.io.File, .FilenameFilter, java.util.ArrayList, .List, java.util.stream.Collectors, sun.jvmstat.PlatformSupport

Class to provide translations from the local Vm Identifier name space into the file system name space and vice-versa.

Provides a factory for creating a File object to the backing store file for instrumentation shared memory region for a JVM identified by its Local Java Virtual Machine Identifier, or lvmid.

Author
Brian Doherty
Since
1.5
See Also
java.io.File

Field Summary

Modifier and TypeField and Description
public static final String
dirNamePrefix

The file name prefix for PerfData shared memory files.

public static final String
fileNamePattern

The file name pattern for PerfData shared memory files.

private static final PlatformSupport
platSupport

Platform Specific methods for looking up temporary directories and process IDs.

public static final String
userDirNamePattern

The directory name pattern for the user directories.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

int - the local Java Virtual Machine Identifier for the target associated with the file
getLocalVmId
(File
A File object representing the name of a shared memory region for a target JVM
file
)

Method to extract a local Java Virtual Machine Identifier from the file name of the given File object.

public static List<String>

Returns:

List - A List of temporary directories to search.
getTempDirectories
(int vmid)

Return the names of the temporary directories being searched for HotSpot PerfData backing store files.

public static String

Returns:

String - the name of the temporary directory.
getTempDirectory
()

Return the name of the temporary directory being searched for HotSpot PerfData backing store files.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dirNamePrefixback to summary
public static final String dirNamePrefix

The file name prefix for PerfData shared memory files.

This prefix must be kept in sync with the prefix used by the JVM.

fileNamePatternback to summary
public static final String fileNamePattern

The file name pattern for PerfData shared memory files.

This pattern must be kept in synch with the file name pattern used by the 1.4.2 and later HotSpot JVM. Earlier versions are no longer supported.

platSupportback to summary
private static final PlatformSupport platSupport

Platform Specific methods for looking up temporary directories and process IDs.

userDirNamePatternback to summary
public static final String userDirNamePattern

The directory name pattern for the user directories.

Constructor Detail

PerfDataFileback to summary
private PerfDataFile()

Method Detail

getLocalVmIdback to summary
public static int getLocalVmId(File file)

Method to extract a local Java Virtual Machine Identifier from the file name of the given File object.

Parameters
file:File

A File object representing the name of a shared memory region for a target JVM

Returns:int

int - the local Java Virtual Machine Identifier for the target associated with the file

Exceptions
IllegalArgumentException:
Thrown if the file name does not conform to the expected pattern
getTempDirectoriesback to summary
public static List<String> getTempDirectories(int vmid)

Return the names of the temporary directories being searched for HotSpot PerfData backing store files.

This method returns the traditional host temp directory but also includes a list of temp directories used by containers.

Returns:List<String>

List - A List of temporary directories to search.

getTempDirectoryback to summary
public static String getTempDirectory()

Return the name of the temporary directory being searched for HotSpot PerfData backing store files.

This method generally returns the value of the java.io.tmpdir property. However, on some platforms it may return a different directory, as the JVM implementation may store the PerfData backing store files in a different directory for performance reasons.

Returns:String

String - the name of the temporary directory.