Module openj9.dtfj

Class JCImage

java.lang.Object
com.ibm.dtfj.image.javacore.JCImage
All Implemented Interfaces:
Image, JCReleasingImage, ManagedImage

public class JCImage extends Object implements JCReleasingImage, ManagedImage
  • Constructor Details

    • JCImage

      public JCImage()
  • Method Details

    • setSource

      public void setSource(URI source)
    • getSource

      public URI getSource()
      Description copied from interface: Image
      A unique identifier for the source of this image
      Specified by:
      getSource in interface Image
      Returns:
      URI for this image or null if this was not used when the image was created.
    • addAddressSpace

      public void addAddressSpace(ImageAddressSpace imageAddressSpace)
      Parameters:
      imageAddressSpace -
    • getAddressSpaces

      public Iterator getAddressSpaces()
      Description copied from interface: Image
      Get the set of address spaces within the image - typically one but may be more on some systems such as Z/OS.
      Specified by:
      getAddressSpaces in interface Image
      Returns:
      an Iterator which iterates over all of the address spaces described by this Image
      See Also:
    • getCreationTime

      public long getCreationTime() throws DataUnavailable
      Description copied from interface: Image
      Get the time when the image was created
      Specified by:
      getCreationTime in interface Image
      Returns:
      the image creation time in milliseconds since 1970
      Throws:
      DataUnavailable
    • getHostName

      public String getHostName() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the host name of the system where the image was running.
      Specified by:
      getHostName in interface Image
      Returns:
      The host name of the system where the image was running. This string will be non-null and non-empty
      Throws:
      DataUnavailable - If the image did not provide this information (would happen if the system did not know its host name or if the image predated this feature).
      CorruptDataException
    • getIPAddresses

      public Iterator getIPAddresses() throws DataUnavailable
      Description copied from interface: Image
      The set of IP addresses (as InetAddresses) which the system running the image possessed.
      Specified by:
      getIPAddresses in interface Image
      Returns:
      An Iterator over the IP addresses (as InetAddresses) which the system running the image possessed. The iterator will be non-null (but can be empty if the host is known to have no IP addresses).
      Throws:
      DataUnavailable - If the image did not provide this information (would happen if the system failed to look them up or if the image pre-dated this feature).
      See Also:
    • getInstalledMemory

      public long getInstalledMemory() throws DataUnavailable
      Description copied from interface: Image
      Get the amount of physical memory (in bytes) installed in the system on which the image was running.
      Specified by:
      getInstalledMemory in interface Image
      Returns:
      the amount of physical memory installed in the system on which the image was running. The return value is specified in bytes.
      Throws:
      DataUnavailable - if the information cannot be provided
    • getProcessorCount

      public int getProcessorCount() throws DataUnavailable
      Description copied from interface: Image
      Get the number of CPUs running in the system on which the image was running.
      Specified by:
      getProcessorCount in interface Image
      Returns:
      the number of CPUs running in the system on which the image was running
      Throws:
      DataUnavailable - if the information cannot be provided
    • getProcessorSubType

      public String getProcessorSubType() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the precise model of the CPU.
      Specified by:
      getProcessorSubType in interface Image
      Returns:
      the precise model of the CPU (note that this can be an empty string but not null).
      e.g. getProcessorType() will return x86 where getProcessorSubType() may return Pentium IV step 4

      Note that this value is platform and implementation dependent.

      Throws:
      DataUnavailable
      CorruptDataException
    • getProcessorType

      public String getProcessorType() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the family name for the processor on which the image was running.
      Specified by:
      getProcessorType in interface Image
      Returns:
      the family name for the processor on which the image was running. This corresponds to the value you would find in the "os.arch" System property.
      Throws:
      DataUnavailable - if this data cannot be inferred from this core type
      CorruptDataException - if expected data cannot be read from the core
    • getSystemSubType

      public String getSystemSubType() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the detailed name of the operating system.
      Specified by:
      getSystemSubType in interface Image
      Returns:
      the detailed name of the operating system, or an empty string if this information is not available (null will never be returned). This should be the same value that would be returned for the "os.version" system property
      Throws:
      DataUnavailable
      CorruptDataException
    • getSystemType

      public String getSystemType() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the family name for the operating system.
      Specified by:
      getSystemType in interface Image
      Returns:
      the family name for the operating system. This should be the same value that would be returned for the "os.name" system property
      Throws:
      DataUnavailable - if this data cannot be inferred from this core type
      CorruptDataException - if expected data cannot be read from the core
    • setAddressSpaces

      public void setAddressSpaces(Vector addressSpaces)
    • setBytesMem

      public void setBytesMem(long bytesMem)
      Parameters:
      bytesMem -
    • setcpuCount

      public void setcpuCount(int cpuCount)
      Parameters:
      cpuCount -
    • setcpuSubType

      public void setcpuSubType(String cpuSubType)
      Parameters:
      cpuSubType -
    • setcpuType

      public void setcpuType(String cpuType)
      Parameters:
      cpuType -
    • setCreationTime

      public void setCreationTime(long creationTime)
      Parameters:
      creationTime -
    • setCreationTimeNanos

      public void setCreationTimeNanos(long nanoTime)
      Parameters:
      creationTimeNanos -
    • setHostName

      public void setHostName(String hostName)
      Parameters:
      hostName -
    • addIPAddresses

      public void addIPAddresses(InetAddress address)
      Parameters:
      addresses -
    • setOSSubType

      public void setOSSubType(String osSubType)
      Parameters:
      osSubType -
    • setOSType

      public void setOSType(String osType)
      Parameters:
      osType -
    • close

      public void close()
      Description copied from interface: Image

      Close this image and any associated resources.

      Some kinds of Image require the generation of temporary resources, for example temporary files created when reading core files and libraries from .zip archives. Ordinarily, these resources are deleted at JVM shutdown, but DTFJ applications may want to free them earlier. This method should only be called when the Image is no longer needed. After this method has been called, any objects associated with the image will be in an invalid state.

      Specified by:
      close in interface Image
    • addReleasable

      public void addReleasable(JavaCoreResourceReleaser o)
      Specified by:
      addReleasable in interface JCReleasingImage
    • getProperties

      public Properties getProperties()
      Description copied from interface: Image
      Gets the OS specific properties for this image.
      Specified by:
      getProperties in interface Image
      Returns:
      a set of OS specific properties
    • getImageSource

      public ManagedImageSource getImageSource()
      Specified by:
      getImageSource in interface ManagedImage
    • setImageSource

      public void setImageSource(ManagedImageSource source)
      Specified by:
      setImageSource in interface ManagedImage
    • getCreationTimeNanos

      public long getCreationTimeNanos() throws DataUnavailable, CorruptDataException
      Description copied from interface: Image
      Get the value of the JVM's high-resolution timer when the image was created.
      Specified by:
      getCreationTimeNanos in interface Image
      Returns:
      the value of the high-resolution timer, in nanoseconds
      Throws:
      DataUnavailable - if the image creation time is not available
      CorruptDataException - if the image creation time is corrupted