view src/org/dancres/blitz/entry/CacheListenerImpl.java @ 9:e92d83b192bb

Remove some dead code (Dave Brosius)
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 23 May 2009 11:28:57 +0100
parents 3dc0c5604566
children
line wrap: on
line source

package org.dancres.blitz.entry;

import org.dancres.blitz.cache.CacheListener;
import org.dancres.blitz.cache.Identifiable;
import org.dancres.blitz.entry.ci.CacheIndexer;

/**
 * Sits between an ArcCache and the CacheIndexer.
 */
public class CacheListenerImpl implements CacheListener {
    private CacheIndexer _indexer;

    CacheListenerImpl(CacheIndexer anIndexer) {
        _indexer = anIndexer;
    }

    public void dirtied(Identifiable anIdentifiable) {
    }

    public void loaded(Identifiable anIdentifiable) {
        _indexer.loaded(anIdentifiable);
    }

    public void flushed(Identifiable anIdentifiable) {
        /*
            We say nothing - done in WriteScheduler and WriteBuffer
            CacheIndexer tracks newly written entry's not yet on disk.  WriteScheduler
            and WriteBuffer are the objects which know when an entry has made it to disk
            hence we leave it to them to notify the CacheIndexer appropriately.
          */
    }
}