IcedTea-Web NetX

## net.sourceforge.jnlp.cache
Class CacheEntry

    java.lang.Object
      net.sourceforge.jnlp.cache.CacheEntry

    public class CacheEntry

extends java.lang.Object

Describes an entry in the cache.

Constructor Summary
`CacheEntry(java.net.URL location, Version version)` Create a CacheEntry for the resources specified as a remote URL.

Method Summary
`long` `getLastUpdated()` Returns the time in the local system clock that the file was most recently checked for an update.
`java.net.URL` `getLocation()` Returns the remote location this entry caches.
`boolean` `isCached()` Returns true if the cache has a local copy of the contents of the URL matching the specified version string.
`boolean` `isCurrent(java.net.URLConnection connection)` Returns whether there is a version of the URL contents in the cache and it is up to date.
`protected void` `lock()` Lock cache item.
`void` `markForDelete()` Mark this entry for deletion at shutdown.
`void` `setLastUpdated(long updatedTime)` Sets the time in the local system clock that the file was most recently checked for an update.
`protected void` `store()` Save the current information for the cache entry.
`protected void` `unlock()` Unlock cache item.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CacheEntry

    public CacheEntry(java.net.URL location,
                      Version version)

  Create a CacheEntry for the resources specified as a remote URL.

  Parameters:
    `location` - the remote resource location
    `version` - the version of the resource

Method Detail

### getLocation

    public java.net.URL getLocation()

  Returns the remote location this entry caches.

### getLastUpdated

    public long getLastUpdated()

  Returns the time in the local system clock that the file was most recently checked for an update.

### setLastUpdated

    public void setLastUpdated(long updatedTime)

  Sets the time in the local system clock that the file was most recently checked for an update.

### isCurrent

    public boolean isCurrent(java.net.URLConnection connection)

  Returns whether there is a version of the URL contents in the cache and it is up to date. This method may not return immediately.

  Parameters:
    `connection` - a connection to the remote URL
  Returns:
    whether the cache contains the version

### isCached

    public boolean isCached()

  Returns true if the cache has a local copy of the contents of the URL matching the specified version string.

  Returns:
    true if the resource is in the cache

### store

    protected void store()

  Save the current information for the cache entry.

### markForDelete

    public void markForDelete()

  Mark this entry for deletion at shutdown.

### lock

    protected void lock()

  Lock cache item.

### unlock

    protected void unlock()

  Unlock cache item.

IcedTea-Web NetX

Submit a bug or feature