X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Frserv%2FCachingFileAccess.java;h=3c76e928c6d9bd4151e97d833e590f6c3fb5baf5;hb=3ca2e6964bf2aab93394cf542b6354ca735703c0;hp=37f3b0889ff5a4f5ff65693db7c70d1ec8ec718f;hpb=82093b06399d9a57cd7e486e9fbeeea9d026cc7c;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java index 37f3b088..3c76e928 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -55,15 +55,15 @@ import org.onap.aaf.misc.env.Store; import org.onap.aaf.misc.env.Trans; /* * CachingFileAccess - * + * * Author: Jonathan Gathman, Gathsys 2010 - * + * */ public class CachingFileAccess extends HttpCode { public static void setEnv(Store store, String[] args) { - for (int i=0;i extends HttpCode typeMap; private final NavigableMap content; @@ -79,7 +79,7 @@ public class CachingFileAccess extends HttpCode extends HttpCode extends HttpCode extends HttpCode extends HttpCode extends HttpCode extends HttpCode extends HttpCode0; } - + if (mediaType==null) { // determine from file Ending int idx = key.lastIndexOf('.'); String subkey = key.substring(++idx); @@ -273,9 +279,9 @@ public class CachingFileAccess extends HttpCode extends HttpCode extends HttpCode extends HttpCode() { @Override @@ -393,7 +399,7 @@ public class CachingFileAccess extends HttpCode extends HttpCode extends HttpCode extends HttpCode extends HttpCode content; - + public Cleanup(NavigableMap content, int size) { maxSize = size; this.content = content; } - + private class Comp implements Comparable { public Map.Entry entry; - + public Comp(Map.Entry en) { entry = en; } - + @Override public int compareTo(Comp o) { return (int)(entry.getValue().access-o.entry.getValue().access); } - + } @SuppressWarnings("unchecked") @Override