question: private boolean log ( final List < T > data ) { int size ; boolean connectionDown = false ; int commitedTags ; IFallback fallbackObj ; if ( data == null ) { LOG . warn ( "log([Collection]) : called with a null collection." ) ; return connectionDown ; } size = data . size ( ) ; if ( size == 0 ) { LOG . debug ( "log([Collection]) : called with an empty collection." ) ; return connectionDown ; } if ( LOG . isDebugEnabled ( ) ) { StringBuffer str = new StringBuffer ( "log([Collection]) : " ) ; str . append ( size ) ; str . append ( " data to be logged." ) ; LOG . debug ( str . toString ( ) ) ; } try { dbHandler . storeData ( data ) ; LOG . info ( "log([Collection]) : " + size + " tags have been successfully logged into the DB" ) ; alarmSender . dbUnavailable ( DOWN , null , dbHandler . getDBInfo ( ) ) ; } catch ( IDBPersistenceException e ) { connectionDown = true ; commitedTags = e . getCommited ( ) ; if ( size > commitedTags ) { List < T > temp = data . subList ( commitedTags , size ) ; synchronized ( fallbackManager . getFallbackFileController ( ) ) { if ( ! writeToFallback ( temp ) ) { for ( int i = 0 ; i < temp . size ( ) ; i ++ ) { fallbackObj = temp . get ( i ) ; FALLBACK_LOG . info ( fallbackObj . toString ( ) ) ; } } } } if ( LOG . isDebugEnabled ( ) ) LOG . debug ( "log([Collection]) : Sending an alarm for warning about the DB problems " + e . getMessage ( ) ) ; alarmSender . dbUnavailable ( ACTIVATED , e . getMessage ( ) , dbHandler . getDBInfo ( ) ) ; } return ! connectionDown ; }
target:  Writes a list of IFallback objects to the shortermlog database table. If the DB becomes unavailable during the logging process the IFallback object will be temporarily stored into a fallback log file, which will avoid losing that data