|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.abstracthorizon.proximity.logic.DefaultProxyingRepositoryLogic
org.abstracthorizon.proximity.logic.DefaultExpiringProxyingRepositoryLogic
public class DefaultExpiringProxyingRepositoryLogic
Simple logic with expiration support. If expirationPeriod is not -1, it will apply expiration period onto items, and will handle removal of them when they expires.
| Field Summary | |
|---|---|
static java.lang.String |
METADATA_EXPIRES
The Constant METADATA_EXPIRES. |
static long |
NO_EXPIRATION
The Constant NO_EXPIRATION. |
| Fields inherited from class org.abstracthorizon.proximity.logic.DefaultProxyingRepositoryLogic |
|---|
logger |
| Constructor Summary | |
|---|---|
DefaultExpiringProxyingRepositoryLogic()
|
|
| Method Summary | |
|---|---|
Item |
afterLocalCopyFound(Repository repository,
ProximityRequest request,
Item item)
If item has defined EXPIRES metadata, will use it and remove item from repository if needed. |
Item |
afterRemoteCopyFound(Repository repository,
ProximityRequest request,
Item localItem,
Item remoteItem)
If expiration period is not NO_EXPIRATION, it will apply it on all items. |
long |
getItemExpirationPeriodInSeconds()
Gets the item expiration period in seconds. |
void |
setItemExpirationPeriodInSeconds(long itemExpirationPeriod)
Sets the item expiration period in seconds. |
| Methods inherited from class org.abstracthorizon.proximity.logic.DefaultProxyingRepositoryLogic |
|---|
afterRetrieval, shouldCheckForLocalCopy, shouldCheckForRemoteCopy, shouldStoreLocallyAfterRemoteRetrieval |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long NO_EXPIRATION
public static final java.lang.String METADATA_EXPIRES
| Constructor Detail |
|---|
public DefaultExpiringProxyingRepositoryLogic()
| Method Detail |
|---|
public long getItemExpirationPeriodInSeconds()
public void setItemExpirationPeriodInSeconds(long itemExpirationPeriod)
itemExpirationPeriod - the new item expiration period in seconds
public Item afterLocalCopyFound(Repository repository,
ProximityRequest request,
Item item)
afterLocalCopyFound in interface RepositoryLogicafterLocalCopyFound in class DefaultProxyingRepositoryLogicrepository - the repositoryrequest - the requestitem - the item
public Item afterRemoteCopyFound(Repository repository,
ProximityRequest request,
Item localItem,
Item remoteItem)
afterRemoteCopyFound in interface RepositoryLogicafterRemoteCopyFound in class DefaultProxyingRepositoryLogicrepository - the repositoryrequest - the requestlocalItem - the local itemremoteItem - the remote item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||