in auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/LateralCacheFactory.java [59:135]
public AuxiliaryCache createCache( AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr )
{
LateralCacheAttributes lac = (LateralCacheAttributes) iaca;
ArrayList noWaits = new ArrayList();
if ( lac.getTransmissionType() == LateralCacheAttributes.UDP )
{
LateralCacheManager lcm = LateralCacheManager.getInstance( lac, cacheMgr );
ICache ic = lcm.getCache( lac.getCacheName() );
if ( ic != null )
{
noWaits.add( ic );
}
}
else if ( lac.getTransmissionType() == LateralCacheAttributes.JAVAGROUPS )
{
LateralCacheManager lcm = LateralCacheManager.getInstance( lac, cacheMgr );
ICache ic = lcm.getCache( lac.getCacheName() );
if ( ic != null )
{
noWaits.add( ic );
}
}
else if ( lac.getTransmissionType() == LateralCacheAttributes.XMLRPC )
{
//pars up the tcp servers and set the tcpServer value and
// get the manager and then get the cache
//Iterator it = lac.tcpServers.iterator();
//while( it.hasNext() ) {
StringTokenizer it = new StringTokenizer( lac.getHttpServers(), "," );
while ( it.hasMoreElements() )
{
//String server = (String)it.next();
String server = (String) it.nextElement();
//p( "tcp server = " + server );
lac.setHttpServer( server );
LateralCacheManager lcm = LateralCacheManager.getInstance( lac, cacheMgr );
ICache ic = lcm.getCache( lac.getCacheName() );
if ( ic != null )
{
noWaits.add( ic );
}
else
{
log.warn( "noWait is null" );
}
}
}
else if ( lac.getTransmissionType() == LateralCacheAttributes.HTTP )
{
StringTokenizer it = new StringTokenizer( lac.getHttpServers(), "," );
while ( it.hasMoreElements() )
{
String server = (String) it.nextElement();
lac.setHttpServer( server );
LateralCacheManager lcm = LateralCacheManager.getInstance( lac, cacheMgr );
ICache ic = lcm.getCache( lac.getCacheName() );
if ( ic != null )
{
noWaits.add( ic );
}
}
}
createListener( lac, cacheMgr );
// create the no wait facade.
LateralCacheNoWaitFacade lcnwf = new LateralCacheNoWaitFacade( (LateralCacheNoWait[]) noWaits
.toArray( new LateralCacheNoWait[0] ), iaca.getCacheName() );
return lcnwf;
}