public class GC extends NetObject
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.GC
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
|
static java.lang.String |
assemblyShortName
Assembly name: System.Private.CoreLib
|
static java.lang.String |
className
Qualified class name: System.GC
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
GC() |
GC(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
AddMemoryPressure(long bytesAllocated) |
static void |
CancelFullGCNotification() |
static GC |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into GC, a cast assert is made to check if types are compatible. |
static void |
Collect() |
static void |
Collect(int generation) |
static void |
Collect(int generation,
GCCollectionMode mode) |
static void |
Collect(int generation,
GCCollectionMode mode,
boolean blocking) |
static void |
Collect(int generation,
GCCollectionMode mode,
boolean blocking,
boolean compacting) |
static int |
CollectionCount(int generation) |
static void |
EndNoGCRegion() |
static long |
GetAllocatedBytesForCurrentThread() |
static GCMemoryInfo |
GetGCMemoryInfo() |
static GCMemoryInfo |
GetGCMemoryInfo(GCKind kind) |
static int |
GetGeneration(NetObject obj) |
static int |
GetGeneration(WeakReference wo) |
java.lang.String |
getJCOAssemblyName()
Returns the reflected Assembly name
|
java.lang.String |
getJCOClassName()
Returns the reflected Class name
|
java.lang.Object |
getJCOInstance()
Returns the instantiated class
|
java.lang.String |
getJCOObjectName()
Returns the reflected Class name used to build the object
|
JCType |
getJCOType()
Returns the instantiated class Type
|
static int |
getMaxGeneration() |
static long |
GetTotalAllocatedBytes(boolean precise) |
static long |
GetTotalMemory(boolean forceFullCollection) |
static TimeSpan |
GetTotalPauseDuration() |
static void |
KeepAlive(NetObject obj) |
static void |
RefreshMemoryLimit() |
static void |
RegisterForFullGCNotification(int maxGenerationThreshold,
int largeObjectHeapThreshold) |
static void |
RegisterNoGCRegionCallback(long totalSize,
Action callback) |
static void |
RemoveMemoryPressure(long bytesAllocated) |
static void |
ReRegisterForFinalize(NetObject obj) |
void |
setJCOInstance(JCObject instance) |
static void |
SuppressFinalize(NetObject obj) |
static boolean |
TryStartNoGCRegion(long totalSize) |
static boolean |
TryStartNoGCRegion(long totalSize,
boolean disallowFullBlockingGC) |
static boolean |
TryStartNoGCRegion(long totalSize,
long lohSize) |
static boolean |
TryStartNoGCRegion(long totalSize,
long lohSize,
boolean disallowFullBlockingGC) |
static GCNotificationStatus |
WaitForFullGCApproach() |
static GCNotificationStatus |
WaitForFullGCApproach(int millisecondsTimeout) |
static GCNotificationStatus |
WaitForFullGCApproach(TimeSpan timeout) |
static GCNotificationStatus |
WaitForFullGCComplete() |
static GCNotificationStatus |
WaitForFullGCComplete(int millisecondsTimeout) |
static GCNotificationStatus |
WaitForFullGCComplete(TimeSpan timeout) |
static void |
WaitForPendingFinalizers() |
public static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public GC() throws java.lang.Throwable
java.lang.Throwablepublic GC(java.lang.Object instance) throws java.lang.Throwable
java.lang.Throwablepublic static void AddMemoryPressure(long bytesAllocated)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
public static void CancelFullGCNotification()
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
RankException,
CultureNotFoundException,
ObjectDisposedException
public static GC cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into GC, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedGC instancejava.lang.Throwable - in case of error during cast operationpublic static void Collect()
throws java.lang.Throwable
java.lang.Throwablepublic static void Collect(int generation)
throws java.lang.Throwable,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
ArgumentException
java.lang.ThrowablePlatformNotSupportedExceptionArgumentOutOfRangeExceptionArgumentExceptionpublic static void Collect(int generation,
GCCollectionMode mode)
throws java.lang.Throwable,
NotSupportedException,
ArgumentException,
PlatformNotSupportedException,
ArgumentOutOfRangeException
java.lang.ThrowableNotSupportedExceptionArgumentExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionpublic static void Collect(int generation,
GCCollectionMode mode,
boolean blocking)
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
IndexOutOfRangeException,
FormatException
public static void Collect(int generation,
GCCollectionMode mode,
boolean blocking,
boolean compacting)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException
public static int CollectionCount(int generation)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
public static void EndNoGCRegion()
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
RankException,
CultureNotFoundException,
ObjectDisposedException
public static long GetAllocatedBytesForCurrentThread()
throws java.lang.Throwable
java.lang.Throwablepublic static GCMemoryInfo GetGCMemoryInfo() throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, CultureNotFoundException, ObjectDisposedException
public static GCMemoryInfo GetGCMemoryInfo(GCKind kind) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
public static int GetGeneration(NetObject obj) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static int GetGeneration(WeakReference wo) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException
java.lang.ThrowableArgumentExceptionNotSupportedExceptionInvalidOperationExceptionArgumentOutOfRangeExceptionPlatformNotSupportedExceptionpublic java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class NetObjectString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class NetObjectString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class NetObjectObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class NetObjectString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class NetObjectJCType representing the CLR Type of the instantiated Classpublic static int getMaxGeneration()
throws java.lang.Throwable
java.lang.Throwablepublic static long GetTotalAllocatedBytes(boolean precise)
throws java.lang.Throwable
java.lang.Throwablepublic static long GetTotalMemory(boolean forceFullCollection)
throws java.lang.Throwable
java.lang.Throwablepublic static TimeSpan GetTotalPauseDuration() throws java.lang.Throwable
java.lang.Throwablepublic static void KeepAlive(NetObject obj) throws java.lang.Throwable
java.lang.Throwablepublic static void RefreshMemoryLimit()
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
ArgumentNullException,
PlatformNotSupportedException
public static void RegisterForFullGCNotification(int maxGenerationThreshold,
int largeObjectHeapThreshold)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
RankException,
CultureNotFoundException,
ObjectDisposedException
public static void RegisterNoGCRegionCallback(long totalSize,
Action callback)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException,
OutOfMemoryException,
FormatException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionArrayTypeMismatchExceptionNotSupportedExceptionObjectDisposedExceptionRankExceptionIndexOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionpublic static void RemoveMemoryPressure(long bytesAllocated)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
ArrayTypeMismatchException,
NotSupportedException,
ObjectDisposedException,
RankException,
IndexOutOfRangeException
public static void ReRegisterForFinalize(NetObject obj) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public void setJCOInstance(JCObject instance)
setJCOInstance in class NetObjectpublic static void SuppressFinalize(NetObject obj) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
public static boolean TryStartNoGCRegion(long totalSize)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException
public static boolean TryStartNoGCRegion(long totalSize,
boolean disallowFullBlockingGC)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException
public static boolean TryStartNoGCRegion(long totalSize,
long lohSize)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException
public static boolean TryStartNoGCRegion(long totalSize,
long lohSize,
boolean disallowFullBlockingGC)
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
RankException,
ArrayTypeMismatchException,
IndexOutOfRangeException,
FormatException
public static GCNotificationStatus WaitForFullGCApproach() throws java.lang.Throwable
java.lang.Throwablepublic static GCNotificationStatus WaitForFullGCApproach(int millisecondsTimeout) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
public static GCNotificationStatus WaitForFullGCApproach(TimeSpan timeout) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
public static GCNotificationStatus WaitForFullGCComplete() throws java.lang.Throwable
java.lang.Throwablepublic static GCNotificationStatus WaitForFullGCComplete(int millisecondsTimeout) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
public static GCNotificationStatus WaitForFullGCComplete(TimeSpan timeout) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
public static void WaitForPendingFinalizers()
throws java.lang.Throwable
java.lang.Throwable