public class MemoryCache extends ObjectCache implements java.lang.AutoCloseable
.NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Runtime.Caching.MemoryCache
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.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
static java.lang.String |
assemblyShortName
Assembly name: System.Runtime.Caching
|
static java.lang.String |
className
Qualified class name: System.Runtime.Caching.MemoryCache
|
static JCType |
classType
The type managed from JCOBridge.
|
Null| Constructor and Description |
|---|
MemoryCache() |
MemoryCache(java.lang.Object instance)
Internal constructor.
|
MemoryCache(java.lang.String name,
NameValueCollection config) |
MemoryCache(java.lang.String name,
NameValueCollection config,
boolean ignoreConfigSection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Add(CacheItem item,
CacheItemPolicy policy) |
CacheItem |
AddOrGetExisting(CacheItem item,
CacheItemPolicy policy) |
NetObject |
AddOrGetExisting(java.lang.String key,
NetObject value,
CacheItemPolicy policy,
java.lang.String regionName) |
NetObject |
AddOrGetExisting(java.lang.String key,
NetObject value,
DateTimeOffset absoluteExpiration,
java.lang.String regionName) |
static MemoryCache |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into MemoryCache, a cast assert is made to check if types are compatible. |
void |
close() |
boolean |
Contains(java.lang.String key,
java.lang.String regionName) |
void |
Dispose() |
NetObject |
Get(java.lang.String key,
java.lang.String regionName) |
CacheItem |
GetCacheItem(java.lang.String key,
java.lang.String regionName) |
long |
getCacheMemoryLimit() |
long |
GetCount(java.lang.String regionName) |
static MemoryCache |
getDefault() |
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
|
long |
GetLastSize(java.lang.String regionName) |
long |
getPhysicalMemoryLimit() |
TimeSpan |
getPollingInterval() |
NetObject |
Remove(java.lang.String key,
CacheEntryRemovedReason reason,
java.lang.String regionName) |
NetObject |
Remove(java.lang.String key,
java.lang.String regionName) |
void |
Set(CacheItem item,
CacheItemPolicy policy) |
void |
Set(java.lang.String key,
NetObject value,
CacheItemPolicy policy,
java.lang.String regionName) |
void |
Set(java.lang.String key,
NetObject value,
DateTimeOffset absoluteExpiration,
java.lang.String regionName) |
void |
setJCOInstance(JCObject instance) |
long |
Trim(int percent) |
Add, Add, getDefaultCacheCapabilities, getHost, getName, setHostGetEnumerator, iteratorEquals, Equals, GetHashCode, GetType, hashCode, toString, ToStringToIEnumerablepublic static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public MemoryCache()
throws java.lang.Throwable
java.lang.Throwablepublic MemoryCache(java.lang.Object instance)
throws java.lang.Throwable
java.lang.Throwablepublic MemoryCache(java.lang.String name,
NameValueCollection config)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException,
FormatException,
Win32Exception,
NullReferenceException,
PlatformNotSupportedException,
WaitHandleCannotBeOpenedException,
FileNotFoundException,
DirectoryNotFoundException,
UnauthorizedAccessException,
IOException,
PathTooLongException,
DriveNotFoundException,
OperationCanceledException,
OverflowException,
ConfigurationException,
ConfigurationErrorsException,
MulticastNotSupportedException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionFormatExceptionWin32ExceptionNullReferenceExceptionPlatformNotSupportedExceptionWaitHandleCannotBeOpenedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionOverflowExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionpublic MemoryCache(java.lang.String name,
NameValueCollection config,
boolean ignoreConfigSection)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException,
FormatException,
Win32Exception,
NullReferenceException,
PlatformNotSupportedException,
WaitHandleCannotBeOpenedException,
FileNotFoundException,
DirectoryNotFoundException,
UnauthorizedAccessException,
IOException,
PathTooLongException,
DriveNotFoundException,
OperationCanceledException,
OverflowException,
ConfigurationException,
ConfigurationErrorsException,
MulticastNotSupportedException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionFormatExceptionWin32ExceptionNullReferenceExceptionPlatformNotSupportedExceptionWaitHandleCannotBeOpenedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionOverflowExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionpublic boolean Add(CacheItem item, CacheItemPolicy policy) throws java.lang.Throwable
Add in class ObjectCachejava.lang.Throwablepublic CacheItem AddOrGetExisting(CacheItem item, CacheItemPolicy policy) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException, AbandonedMutexException, PlatformNotSupportedException
AddOrGetExisting in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentOutOfRangeExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionAbandonedMutexExceptionPlatformNotSupportedExceptionpublic NetObject AddOrGetExisting(java.lang.String key, NetObject value, CacheItemPolicy policy, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, TypeLoadException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, NotImplementedException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, OutOfMemoryException, MissingManifestResourceException, ObjectDisposedException, FormatException, AbandonedMutexException, PlatformNotSupportedException
AddOrGetExisting in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionFormatExceptionAbandonedMutexExceptionPlatformNotSupportedExceptionpublic NetObject AddOrGetExisting(java.lang.String key, NetObject value, DateTimeOffset absoluteExpiration, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, TypeLoadException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, NotImplementedException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, OutOfMemoryException, MissingManifestResourceException, ObjectDisposedException, FormatException, AbandonedMutexException, PlatformNotSupportedException
AddOrGetExisting in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionFormatExceptionAbandonedMutexExceptionPlatformNotSupportedExceptionpublic static MemoryCache cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into MemoryCache, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedMemoryCache instancejava.lang.Throwable - in case of error during cast operationpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic boolean Contains(java.lang.String key,
java.lang.String regionName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotImplementedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
MissingManifestResourceException,
ObjectDisposedException
Contains in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic void Dispose()
throws java.lang.Throwable,
ArgumentException,
InvalidOperationException,
ArgumentNullException,
KeyNotFoundException,
ObjectDisposedException,
AbandonedMutexException,
NotImplementedException,
MissingManifestResourceException,
ArgumentOutOfRangeException,
NullReferenceException,
CultureNotFoundException,
PlatformNotSupportedException,
NotSupportedException,
Win32Exception,
SecurityException,
UnauthorizedAccessException,
IOException,
OutOfMemoryException,
SystemException,
ApplicationException
java.lang.ThrowableArgumentExceptionInvalidOperationExceptionArgumentNullExceptionKeyNotFoundExceptionObjectDisposedExceptionAbandonedMutexExceptionNotImplementedExceptionMissingManifestResourceExceptionArgumentOutOfRangeExceptionNullReferenceExceptionCultureNotFoundExceptionPlatformNotSupportedExceptionNotSupportedExceptionWin32ExceptionSecurityExceptionUnauthorizedAccessExceptionIOExceptionOutOfMemoryExceptionSystemExceptionApplicationExceptionpublic NetObject Get(java.lang.String key, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
Get in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic CacheItem GetCacheItem(java.lang.String key, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException
GetCacheItem in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic long getCacheMemoryLimit()
throws java.lang.Throwable
java.lang.Throwablepublic long GetCount(java.lang.String regionName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException
GetCount in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic static MemoryCache getDefault() throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, OutOfMemoryException, CultureNotFoundException, NotSupportedException, NotImplementedException, MissingManifestResourceException, ObjectDisposedException, InvalidOperationException, FormatException, IndexOutOfRangeException, Win32Exception, NullReferenceException, PlatformNotSupportedException, WaitHandleCannotBeOpenedException, FileNotFoundException, DirectoryNotFoundException, UnauthorizedAccessException, IOException, PathTooLongException, DriveNotFoundException, OperationCanceledException, OverflowException, ConfigurationException, ConfigurationErrorsException, MulticastNotSupportedException
java.lang.ThrowableArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionCultureNotFoundExceptionNotSupportedExceptionNotImplementedExceptionMissingManifestResourceExceptionObjectDisposedExceptionInvalidOperationExceptionFormatExceptionIndexOutOfRangeExceptionWin32ExceptionNullReferenceExceptionPlatformNotSupportedExceptionWaitHandleCannotBeOpenedExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionOverflowExceptionConfigurationExceptionConfigurationErrorsExceptionMulticastNotSupportedExceptionpublic java.lang.String getJCOAssemblyName()
IJCOBridgeReflectedgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class ObjectCacheString representing the Fullname of reflected Assemblypublic java.lang.String getJCOClassName()
IJCOBridgeReflectedgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class ObjectCacheString representing the Fullname of reflected Classpublic java.lang.Object getJCOInstance()
IJCOBridgeReflectedgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class ObjectCacheObject representing the CLR instance of the instantiated Classpublic java.lang.String getJCOObjectName()
IJCOBridgeReflectedgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class ObjectCacheString representing the name used to allocated the object
in CLR contextpublic JCType getJCOType()
IJCOBridgeReflectedgetJCOType in interface IJCOBridgeReflectedgetJCOType in class ObjectCacheJCType representing the CLR Type of the instantiated Classpublic long GetLastSize(java.lang.String regionName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic long getPhysicalMemoryLimit()
throws java.lang.Throwable
java.lang.Throwablepublic TimeSpan getPollingInterval() throws java.lang.Throwable, ArgumentException, OverflowException
java.lang.ThrowableArgumentExceptionOverflowExceptionpublic NetObject Remove(java.lang.String key, CacheEntryRemovedReason reason, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, TypeLoadException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, NotImplementedException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, OutOfMemoryException, MissingManifestResourceException, ObjectDisposedException, PlatformNotSupportedException
java.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionPlatformNotSupportedExceptionpublic NetObject Remove(java.lang.String key, java.lang.String regionName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotImplementedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, MissingManifestResourceException, ObjectDisposedException, PlatformNotSupportedException
Remove in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotImplementedExceptionNotSupportedExceptionArgumentOutOfRangeExceptionCultureNotFoundExceptionMissingManifestResourceExceptionObjectDisposedExceptionPlatformNotSupportedExceptionpublic void Set(CacheItem item, CacheItemPolicy policy) throws java.lang.Throwable, ArgumentNullException
Set in class ObjectCachejava.lang.ThrowableArgumentNullExceptionpublic void Set(java.lang.String key,
NetObject value,
CacheItemPolicy policy,
java.lang.String regionName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException,
FormatException,
AbandonedMutexException,
PlatformNotSupportedException
Set in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionFormatExceptionAbandonedMutexExceptionPlatformNotSupportedExceptionpublic void Set(java.lang.String key,
NetObject value,
DateTimeOffset absoluteExpiration,
java.lang.String regionName)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
TypeLoadException,
InvalidOperationException,
MissingMethodException,
TargetInvocationException,
NotSupportedException,
NotImplementedException,
ArgumentOutOfRangeException,
IndexOutOfRangeException,
CultureNotFoundException,
OutOfMemoryException,
MissingManifestResourceException,
ObjectDisposedException
Set in class ObjectCachejava.lang.ThrowableArgumentNullExceptionArgumentExceptionTypeLoadExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionNotImplementedExceptionArgumentOutOfRangeExceptionIndexOutOfRangeExceptionCultureNotFoundExceptionOutOfMemoryExceptionMissingManifestResourceExceptionObjectDisposedExceptionpublic void setJCOInstance(JCObject instance)
setJCOInstance in class ObjectCachepublic long Trim(int percent)
throws java.lang.Throwable,
InvalidOperationException,
ArgumentOutOfRangeException,
FileNotFoundException,
DirectoryNotFoundException,
UnauthorizedAccessException,
IOException,
PathTooLongException,
DriveNotFoundException,
OperationCanceledException,
ArgumentException,
ArgumentNullException,
ObjectDisposedException,
AbandonedMutexException
java.lang.ThrowableInvalidOperationExceptionArgumentOutOfRangeExceptionFileNotFoundExceptionDirectoryNotFoundExceptionUnauthorizedAccessExceptionIOExceptionPathTooLongExceptionDriveNotFoundExceptionOperationCanceledExceptionArgumentExceptionArgumentNullExceptionObjectDisposedExceptionAbandonedMutexException