public class UpdatePolicy
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static UpdatePolicy |
ALWAYS |
|
static UpdatePolicy |
FORCE |
|
static UpdatePolicy |
NEVER |
|
static UpdatePolicy |
SESSION |
| Constructor | Description |
|---|---|
UpdatePolicy() |
Create a new update policy; this policy always updates the
entry unless the shouldUpdate method is overridden.
|
UpdatePolicy(long timeDiff) |
Create an update policy that only checks a file for being
updated if it has not been checked for longer than the
specified time.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
shouldUpdate(CacheEntry entry) |
public static UpdatePolicy ALWAYS
public static UpdatePolicy SESSION
public static UpdatePolicy FORCE
public static UpdatePolicy NEVER
public UpdatePolicy()
public UpdatePolicy(long timeDiff)
timeDiff - how long in ms until update neededpublic boolean shouldUpdate(CacheEntry entry)
entry - entry which shoul;d be cared