|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.memory.MemCaster
This class implements a simple Caster for memory based systems. Warning!!! This implementation calls on the Freezer, so don't use it inside the Freezer. It's fine for inside a Digger.
Field Summary |
Fields inherited from interface net.walend.lyophil.Caster |
CASTER |
Constructor Summary | |
MemCaster()
|
Method Summary | |
boolean |
checkSetUp()
make sure the backing storage is set up correctly |
int |
count()
Warning!!! asks the Freezer. |
int |
countByClass(java.lang.Class interf)
Warning!!! asks the Freezer. |
Set |
findByClass(java.lang.Class interf)
Warning!!! asks the Freezer. |
java.lang.Class |
findInterfaceForFreezable(Freezable freezable)
Returns the working interface for the freezable. |
private java.lang.Class |
findInterfaceForFreezableFromProperties(Freezable freezable)
|
java.lang.Class |
findInterfaceForIdentifier(java.io.Serializable id)
Warning!! This method asks the Freezer for the Freezable. |
void |
freeze(Freezable freezable)
Does nothing. |
Set |
getAllIdentifiers()
Warning!!! asks the Freezer. |
protected Mother |
getMother()
|
protected PropertySource |
getPropertySource()
|
protected MemStorage |
getStorage()
|
boolean |
isAbsent(java.io.Serializable identifier)
Warning!!! asks the Freezer. |
boolean |
isPresent(java.io.Serializable identifier)
Warning!!! asks the Freezer. |
void |
setUp()
set up the backing storage |
void |
tearDown()
clean up the backing storage |
Freezable |
thaw(java.io.Serializable id)
Does nothing |
void |
throwOut(java.io.Serializable id)
Does nothing. |
void |
validate(java.io.Serializable id,
InvalidFrozenMap ife)
Validates identifier. |
void |
validateAll(InvalidFrozenMap ife)
Validates all the identifiers in the Caster. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MemCaster()
Method Detail |
protected MemStorage getStorage()
protected Mother getMother()
protected PropertySource getPropertySource()
public java.lang.Class findInterfaceForIdentifier(java.io.Serializable id) throws NotInFreezerException
findInterfaceForIdentifier
in interface Caster
private java.lang.Class findInterfaceForFreezableFromProperties(Freezable freezable)
public java.lang.Class findInterfaceForFreezable(Freezable freezable)
Caster
findInterfaceForFreezable
in interface Caster
public void freeze(Freezable freezable)
freeze
in interface Caster
public Freezable thaw(java.io.Serializable id) throws NotInFreezerException
thaw
in interface Caster
public void throwOut(java.io.Serializable id) throws NotInFreezerException
throwOut
in interface Caster
public void validate(java.io.Serializable id, InvalidFrozenMap ife)
validate
in interface Caster
public void validateAll(InvalidFrozenMap ife)
validateAll
in interface Caster
public boolean isAbsent(java.io.Serializable identifier)
isAbsent
in interface Caster
public boolean isPresent(java.io.Serializable identifier)
isPresent
in interface Caster
public Set getAllIdentifiers()
getAllIdentifiers
in interface Caster
public int count()
count
in interface Caster
public int countByClass(java.lang.Class interf)
countByClass
in interface Caster
public Set findByClass(java.lang.Class interf)
findByClass
in interface Caster
public boolean checkSetUp()
Caster
checkSetUp
in interface Caster
public void setUp()
Caster
setUp
in interface Caster
public void tearDown()
Caster
tearDown
in interface Caster
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |