private void openCache ( Session session , String dataSourceNew , boolean isReversedNew , boolean isReadOnlyNew ) { String dataSourceOld = dataSource ; boolean isReversedOld = isReversed ; boolean isReadOnlyOld = isReadOnly ; if ( dataSourceNew == null ) { dataSourceNew = "" ; } disconnect ( ) ; dataSource = dataSourceNew ; isReversed = ( isReversedNew && dataSource . length ( ) > 0 ) ; try { connect ( session , isReadOnlyNew ) ; } catch ( HsqlException e ) { dataSource = dataSourceOld ; isReversed = isReversedOld ; connect ( session , isReadOnlyOld ) ; throw e ; } }
This method does some of the work involved with managing the creation and openning of the cache the rest is done in Log . java and TextCache . java .