| java.lang.Object | |
| ↳ | org.apache.directmemory.cache.CacheServiceImpl<K, V> | 
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructor
 
  
   | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Explicitly allocated a bunch of bytes in the cache using a given key and type and returns the created
  
  
  Pointer. | |||||||||||
Clears the whole cache by removing all stored keys. 
  
   | |||||||||||
Tells the  
  
  CacheService to collect and remove all expired AND least frequently used keys. | |||||||||||
Tells the  
  
  CacheService to collect and remove all expired keys. | |||||||||||
Tells the  
  
  CacheService to collect and remove all least frequently used keys. | |||||||||||
Dumps information about the actual internal  
  
  MemoryManagerService to the configured Logger with
 info loglevel. | |||||||||||
Retrieves the count of the current entries. 
  
   | |||||||||||
Removes the key and frees the underlying memory area. 
  
   | |||||||||||
Removes the pointer and frees the underlying memory area. 
  
   | |||||||||||
Retrieves a map of all available keys and their according  
  
  Pointers. | |||||||||||
Retrieves the internally used  
  
  MemoryManagerService implementation. | |||||||||||
Retrieves the accociated  
  
  Pointer to the given key or null if no pointer was found. | |||||||||||
Retrieves the internally used  
  
  Serializer implementation. | |||||||||||
Serializes and stored the given value using the key and sets the expiresIn value for the expiration of the key. 
  
   | |||||||||||
Serializes and stored the given value using the key with no expiration value. 
  
   | |||||||||||
Stored a preserialized payload with the given key. 
  
   | |||||||||||
Stored a preserialized payload with the given key with no expiration value. 
  
   | |||||||||||
Retrieves the stored, deserialized value for key. 
  
   | |||||||||||
Retrieves the stored payload for key as a bytearray. 
  
   | |||||||||||
Schedules the disposal event with the given period with the given TimeUnit. 
  
   | |||||||||||
Schedules the disposal event with the given period in milliseconds. 
  
   | |||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  java.lang.Object
 | |||||||||||
   
From interface
  java.io.Closeable
 | |||||||||||
   
From interface
  org.apache.directmemory.cache.CacheService
 | |||||||||||
   
From interface
  org.apache.directmemory.cache.MutableCacheService
 | |||||||||||
Constructor
Explicitly allocated a bunch of bytes in the cache using a given key and type and returns the created
 Pointer.
| key | The key to store as | 
|---|---|
| type | The datatype of the underlying data | 
| size | The size to allocate for this pointer | 
Clears the whole cache by removing all stored keys. It is up to the underlying MemoryManagerService
 implementation to free allocated memory or not.
Tells the CacheService to collect and remove all expired AND least frequently used keys. In most cases
 this is automatically handled by scheduling a disposal interval using scheduleDisposalEvery(long)
 and there are very rare cases where this needs to be called manually.
Tells the CacheService to collect and remove all expired keys. In most cases this is automatically
 handled by scheduling a disposal interval using scheduleDisposalEvery(long) and there are very
 rare cases where this needs to be called manually.
Tells the CacheService to collect and remove all least frequently used keys. This operation could
 possibly clear the whole cache if there were no recent actions. In most cases this is automatically handled by
 scheduling a disposal interval using scheduleDisposalEvery(long) and there are very rare cases
 where this needs to be called manually.
Dumps information about the actual internal MemoryManagerService to the configured Logger with
 info loglevel.
Retrieves the count of the current entries.
Removes the key and frees the underlying memory area.
| key | The key to remove | 
|---|
Removes the pointer and frees the underlying memory area.
| pointer | The pointer to remove | 
|---|
Retrieves a map of all available keys and their according Pointers. It is up to the CacheService
 implementation if the retrieved map is threadsafe or not. The standard implementation uses a
 ConcurrentHashMap.
Retrieves the internally used MemoryManagerService implementation.
Retrieves the accociated Pointer to the given key or null if no pointer was found.
| key | The key to retrieve | 
|---|
Retrieves the internally used Serializer implementation.
Serializes and stored the given value using the key and sets the expiresIn value for the expiration of the key. If not enough space found to store the payload the returned pointer is null.
| key | The key to save the value with | 
|---|---|
| value | The value to serialize and store | 
| expiresIn | The expiration delay | 
Serializes and stored the given value using the key with no expiration value. If not enough space found to store the payload the returned pointer is null.
| key | The key to save the value with | 
|---|---|
| value | The value to serialize and store | 
Stored a preserialized payload with the given key. The expiration is set to the given expiresIn value in milliseconds. If not enough space found to store the payload the returned pointer is null.
| key | The key to save the payload with | 
|---|---|
| payload | The preserialized payload as bytearray | 
| expiresIn | The expiration delay | 
Stored a preserialized payload with the given key with no expiration value. If not enough space found to store the payload the returned pointer is null.
| key | The key to save the payload with | 
|---|---|
| payload | The preserialized payload as bytearray | 
Retrieves the stored, deserialized value for key. If no pointer is found for the given key null is returned.
| key | The key to retrieve | 
|---|
Retrieves the stored payload for key as a bytearray. If no pointer is found for the given key null is returned.
| key | The key to retrieve | 
|---|
Schedules the disposal event with the given period with the given TimeUnit.
| period | The time period | 
|---|---|
| unit | The period's timeunit | 
Schedules the disposal event with the given period in milliseconds.
| period | The time period in milliseconds | 
|---|