Code example for Cache

Methods: get

0
    public static ReferencedEnvelope getReferencedEnvelope(final CoordinateReferenceSystem crs) {
        if (crs == null) {
            return new ReferencedEnvelope(); 
        } 
        try { 
            ReferencedEnvelope envelope = (ReferencedEnvelope) crsCache.get( crs.getName(), new Callable<Object>(){
                public Object call() { 
                    return getCRSBounds(crs); 
                } 
            }); 
            return envelope;
        } catch (Throwable e) {
            return new ReferencedEnvelope(); 
        } 
    } 
 
    private static ReferencedEnvelope getCRSBounds(CoordinateReferenceSystem crs) {
        if (crs == null)
            return new ReferencedEnvelope(); 
        try {