if ( cacheDesc == null )
{
return null;
}
CompositeCache c = (CompositeCache) cacheDesc.cache;
ICacheElement element = null;
// If we have a get come in from a client and we don't have the item
// locally, we will allow the cache to look in other non local sources,
// such as a remote cache or a lateral.
//
// Since remote servers never get from clients and clients never go
// remote from a remote call, this
// will not result in any loops.
//
// This is the only instance I can think of where we allow a remote get
// from a remote call. The purpose is to allow remote cache servers to
// talk to each other. If one goes down, you want it to be able to get
// data from those that were up when the failed server comes back o
// line.
if ( !fromCluster && this.rcsa.getAllowClusterGet() )
{
if ( log.isDebugEnabled() )
{
log.debug( "NonLocalGet. fromCluster [" + fromCluster + "] AllowClusterGet [" + this.rcsa.getAllowClusterGet() + "]" );
}
element = c.get( key );
}
else
{
// Gets from cluster type remote will end up here.
// Gets from all clients will end up here if allow cluster get is
// false.
if ( log.isDebugEnabled() )
{
log.debug( "LocalGet. fromCluster [" + fromCluster + "] AllowClusterGet [" + this.rcsa.getAllowClusterGet() + "]" );
}
element = c.localGet( key );
}
return element;
}