Package bm.core

Examples of bm.core.SimpleCache


     */
    public synchronized Row fetch( final int recordId )
            throws DBException,
                   RSException, RecordStoreFullException
    {
        final SimpleCache cache = this.cache;

        Row row = (Row) cache.get( Integer.toString( recordId ) );
        if( row != null )
        {
            // Sanitiy check, if for any reason the cache returns an invalid object
            if(
                    row.getRecordId() != null &&
                    row.getRecordId().intValue() == recordId
            )
            {
                return row.cloneRow();
            }
            else
            {
                cache.clear();
            }
        }
        row = getRowFromStore( recordId, false );
        cache.add( Integer.toString( recordId ), row );
        return row.cloneRow();
    }
View Full Code Here

TOP

Related Classes of bm.core.SimpleCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.