|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--amwebarsentitlementservice.storage.AMWebARSStorage
Stores AMWebARSContainers until they are invalid. The AMWebARSStorage maintains the invariant that each request only taskes valid containers into account. That means that for instance the getContainer method only returns valid containers or null.
Constructor Summary | |
protected |
AMWebARSStorage()
|
Method Summary | |
void |
addContainer(AMWebARSContainer container)
Adds a container to the AMWebARSStorage. |
boolean |
checkTimeout(java.lang.String container_type_id,
Subject subject)
Checks whether a container specified by container_type_id and subject is still valid. |
void |
cleanStorage()
Removes all containers from the AMWebARSStorage that are invalid at the current time. |
void |
cleanStorage(long date)
Removes all containers from the AMWebARSStorage that are invalid at a given date. |
void |
clear()
Removes all containers from the AMWebARSStorage. |
protected java.lang.Object |
clone()
It isn't permited to clone the object: The clone method throws the CloneNotSupportedException. |
boolean |
containsContainer(java.lang.String container_type_id,
Subject subject)
Checks whether the AMWebARSStorage contains a specific container for a given container_type_id and a subject. |
boolean |
equals(java.lang.Object other_object)
Tests whether this AMWebARSStorage is equal to another. |
AMWebARSContainer |
getContainer(java.lang.String container_type_id,
Subject subject)
Returns a chached container for a given container_type_id and a Subject. |
static AMWebARSStorage |
getInstance()
Returns the only instance of the AMWebARSStorage. |
boolean |
isEmpty()
Tests whether the AMWebARSStorage is empty. |
AMWebARSContainer |
removeContainer(java.lang.String container_type_id,
Subject subject)
Removes a container specified by container_type_id and subject from the AMWebARSStorage. |
int |
size()
Returns the current number of valid elements. |
java.lang.String |
toString()
Returns a string description of the AMWebARSStorage. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected AMWebARSStorage()
Method Detail |
public static AMWebARSStorage getInstance()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- public AMWebARSContainer getContainer(java.lang.String container_type_id, Subject subject)
container_type_id
- id of the container type.subject
- Subject the container was retrieved for.public void addContainer(AMWebARSContainer container)
container
- AMWebARSContainer which is to be added.NullPointerException
- if the container is null.public boolean containsContainer(java.lang.String container_type_id, Subject subject)
container_type_id
- String id of the containersubject
- the Subject the container was requested for.public AMWebARSContainer removeContainer(java.lang.String container_type_id, Subject subject)
container_type_id
- String id of the containersubject
- the Subject the container was requested for.public boolean checkTimeout(java.lang.String container_type_id, Subject subject)
container_type_id
- String id of the containersubject
- the Subject the container was requested for.public boolean isEmpty()
public int size()
public void clear()
public void cleanStorage()
public void cleanStorage(long date)
date
- long value of the date.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other_object)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |