public <T> T getInstanceOf(Class<T> clazz, Object key, boolean withReadOptimization)
         throws InvalidCacheUsageException {
      return getInstanceOf(clazz, key, withReadOptimization, null, true);
   }
public < T > T getInstanceOf ( Class < T > clazz , Object key , boolean withReadOptimization ) throws InvalidCacheUsageException { return getInstanceOf ( clazz , key , withReadOptimization , null , true ) ; }
Returns an object of class <i>clazz</i>.
The class of this object must be initially serializable, as well as all the parameters of its methods.
Furthermore, the class must be deterministic.

The object is atomic if <i>withReadOptimization</i> equals false; otherwise it is sequentially consistent..
In more details, if <i>withReadOptimization</i>  is set, every call to the object is first executed locally on a copy of the object, and in case
the call does not modify the state of the object, the value returned is the result of this tentative execution.

@param clazz a class object
@param key the key to use in order to store the object.
@param withReadOptimization set the read optimization on/off.
@return an object of the class <i>clazz</i>
@throws InvalidCacheUsageException