NotificationsActionCache (gCube Notifications Checker Servlet 2.0.1-4.5.0-132054 API)
Date: 2017-06-10

org.gcube.portal.notifications.cache

## Class NotificationsActionCache

- java.lang.Object
- - org.gcube.portal.notifications.cache.NotificationsActionCache

-     public class NotificationsActionCache
      extends Object

  The cache keep track of the actions to take for a user, that is if notifications must be pushed or not, according to the timestamp of the last action as well a timeout value.
  Author:
    Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Long` | `get(String key)` Retrieve the value associated to the key
    `static NotificationsActionCache` | `getCacheInstance()` Retrieve the current cache instance object
    `boolean` | `insert(String key, Long value)` Insert a couple in the cache
    `void` | `removeKey(String key)` Forcedly remove an entry

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getCacheInstance

          public static NotificationsActionCache getCacheInstance()

      Retrieve the current cache instance object
      Returns:

    - #### get

          public Long get(String key)

      Retrieve the value associated to the key
      Parameters:
        `key` -
      Returns:
        null if the key doesn't exist or expired

    - #### insert

          public boolean insert(String key,
                                Long value)

      Insert a couple in the cache
      Parameters:
        `key` -
        `value` -
      Returns:

    - #### removeKey

          public void removeKey(String key)

      Forcedly remove an entry
      Parameters:
        `username` -

Copyright © 2017. All Rights Reserved.