Code example for ReentrantLock

 * Google specific implementation of the itemized cache overlay 
public class GoogleCacheOverlay extends ItemizedOverlay<GoogleCacheOverlayItem> implements ItemizedOverlayImpl { 
    private CachesOverlay base;
    private Lock lock = new ReentrantLock();
    public GoogleCacheOverlay(Context contextIn, Drawable markerIn) {
        base = new CachesOverlay(this, contextIn);
    public CachesOverlay getBase() { 
        return base;
    protected GoogleCacheOverlayItem createItem(int i) {
        if (base == null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE