{
if ( log.isDebugEnabled() )
{
log.debug( "Handlers are registered. Event -- ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE" );
}
IElementEvent event = new ElementEvent( ce, IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_AVAILABLE );
Iterator hIt = eventHandlers.iterator();
while ( hIt.hasNext() )
{
IElementEventHandler hand = ( IElementEventHandler ) hIt.next();
//hand.handleElementEvent( event );
addElementEvent( hand, event );
}
}
aux.update( ce );
}
catch ( IOException ex )
{
// impossible case.
ex.printStackTrace();
throw new IllegalStateException( ex.getMessage() );
}
catch ( Exception oee )
{
}
if ( log.isDebugEnabled() )
{
log.debug( "spoolToDisk done for: " + ce.getKey() + " on disk cache[" + i + "]" );
}
}
}
if ( !diskAvailable )
{
try
{
// handle event, might move to a new method
ArrayList eventHandlers = ce.getElementAttributes().getElementEventHandlers();
if ( eventHandlers != null )
{
if ( log.isDebugEnabled() )
{
log.debug( "Handlers are registered. Event -- ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE" );
}
IElementEvent event = new ElementEvent( ce, IElementEventConstants.ELEMENT_EVENT_SPOOLED_DISK_NOT_AVAILABLE );
Iterator hIt = eventHandlers.iterator();
while ( hIt.hasNext() )
{
IElementEventHandler hand = ( IElementEventHandler ) hIt.next();
//hand.handleElementEvent( event );