Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.loader.cache
Class DefaultExpirationPolicy

    java.lang.Object
      org.apache.xmlgraphics.image.loader.cache.DefaultExpirationPolicy

All Implemented Interfaces:
  ExpirationPolicy

    public class DefaultExpirationPolicy

extends Object
implements ExpirationPolicy

Implements the default expiration policy for the image cache.

Field Summary
`static int` | `EXPIRATION_IMMEDIATE`
`static int` | `EXPIRATION_NEVER`

Constructor Summary
`DefaultExpirationPolicy()` Creates a new policy with default settings (expiration in 60 seconds).
`DefaultExpirationPolicy(int expirationAfter)` Creates a new policy.

Method Summary
`boolean` | `isExpired(org.apache.xmlgraphics.image.loader.cache.TimeStampProvider provider, long timestamp)` Indicates whether a cache entry is expired given its creation time stamp.

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

Field Detail

### EXPIRATION_IMMEDIATE

    public static final int EXPIRATION_IMMEDIATE

See Also:
  Constant Field Values

### EXPIRATION_NEVER

    public static final int EXPIRATION_NEVER

See Also:
  Constant Field Values

Constructor Detail

### DefaultExpirationPolicy

    public DefaultExpirationPolicy()

  Creates a new policy with default settings (expiration in 60 seconds).

### DefaultExpirationPolicy

    public DefaultExpirationPolicy(int expirationAfter)

  Creates a new policy.

  Parameters:
    `expirationAfter` - the expiration in seconds (a negative value means: never expire)

Method Detail

### isExpired

    public boolean isExpired(org.apache.xmlgraphics.image.loader.cache.TimeStampProvider provider,
                             long timestamp)

  Indicates whether a cache entry is expired given its creation time stamp.

  Specified by:
    `isExpired` in interface `ExpirationPolicy`
  Parameters:
    `provider` - the provider for new time stamps
    `timestamp` - the creation time stamp (the semantics of `System.currentTimeMillis()` apply)
  Returns:
    true if the entry is to be considered expired, false if not

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.