com.smhumayun.mi_plus
Interface MIObjectCache

All Known Implementing Classes:
MIObjectInMemoryCache

public interface MIObjectCache

MI Object Cache used by MIFactory

Since:
1.0
Author:
smhumayun

Method Summary
 void cacheComposedObjects(Class miContainerClass, LinkedHashMap<Class,Object> composedObjects)
          Cache given composedObjects against given miContainerClass
 void cacheMiContainerProxy(Class miContainerClass, Object miContainerProxy)
          Cache given miContainerProxy object against given miContainerClass
 LinkedHashMap<Class,Object> getCachedComposedObjects(Class miContainerClass)
          Get cached Composed Objects against given miContainerClass
 Object getCachedMiContainerProxy(Class miContainerClass)
          Get cached MI Container Proxy object against given miContainerClass
 boolean isValidated(Class classToValidate)
          Returns true of the classToValidate has already been validated
 void validated(Class validatedClass)
          Cache this validatedClass and mark it as validated
 

Method Detail

getCachedMiContainerProxy

Object getCachedMiContainerProxy(Class miContainerClass)
                                 throws MIException
Get cached MI Container Proxy object against given miContainerClass

Parameters:
miContainerClass - MI Container class - the class which has the MISupport annotation
Returns:
cached MI Container Proxy object against given miContainerClass
Throws:
MIException - MIException

cacheMiContainerProxy

void cacheMiContainerProxy(Class miContainerClass,
                           Object miContainerProxy)
                           throws MIException
Cache given miContainerProxy object against given miContainerClass

Parameters:
miContainerClass - MI Container class - the class which has the MISupport annotation
miContainerProxy - MI Container Proxy object to cache
Throws:
MIException - MIException

getCachedComposedObjects

LinkedHashMap<Class,Object> getCachedComposedObjects(Class miContainerClass)
                                                     throws MIException
Get cached Composed Objects against given miContainerClass

Parameters:
miContainerClass - MI Container class - the class which has the MISupport annotation
Returns:
cached Composed Objects against given miContainerClass
Throws:
MIException - MIException

cacheComposedObjects

void cacheComposedObjects(Class miContainerClass,
                          LinkedHashMap<Class,Object> composedObjects)
                          throws MIException
Cache given composedObjects against given miContainerClass

Parameters:
miContainerClass - MI Container class - the class which has the MISupport annotation
composedObjects - composed objects to cache
Throws:
MIException - MIException

isValidated

boolean isValidated(Class classToValidate)
                    throws MIException
Returns true of the classToValidate has already been validated

Parameters:
classToValidate - class to
Returns:
true if validates, false otherwise
Throws:
MIException - MIException

validated

void validated(Class validatedClass)
               throws MIException
Cache this validatedClass and mark it as validated

Parameters:
validatedClass - validated class to cache
Throws:
MIException - MIException


Copyright © 2013–2015 Syed Muhammad Humayun - smhumayun@gmail.com. All rights reserved.