@Override public boolean isIn(String ipAddress) { //is cache expired //Uses Double Checked Locking using volatile if (cacheExpiryTimeStamp >= 0 && cacheExpiryTimeStamp < System.currentTimeMillis()) { synchronized(this) { //check if cache expired again if (cacheExpiryTimeStamp < System.currentTimeMillis()) { reset(); } } } return ipList.isIn(ipAddress); } }
@Override public boolean isIn(String ipAddress) { //is cache expired //Uses Double Checked Locking using volatile if (cacheExpiryTimeStamp >= 0 && cacheExpiryTimeStamp < System.currentTimeMillis()) { synchronized(this) { //check if cache expired again if (cacheExpiryTimeStamp < System.currentTimeMillis()) { reset(); } } } return ipList.isIn(ipAddress); } }
@Override public boolean isIn(String ipAddress) { //is cache expired //Uses Double Checked Locking using volatile if (cacheExpiryTimeStamp >= 0 && cacheExpiryTimeStamp < System.currentTimeMillis()) { synchronized(this) { //check if cache expired again if (cacheExpiryTimeStamp < System.currentTimeMillis()) { reset(); } } } return ipList.isIn(ipAddress); } }
@Override public boolean isIn(String ipAddress) { //is cache expired //Uses Double Checked Locking using volatile if (cacheExpiryTimeStamp >= 0 && cacheExpiryTimeStamp < System.currentTimeMillis()) { synchronized(this) { //check if cache expired again if (cacheExpiryTimeStamp < System.currentTimeMillis()) { reset(); } } } return ipList.isIn(ipAddress); } }
@Override public boolean isIn(String ipAddress) { //is cache expired //Uses Double Checked Locking using volatile if (cacheExpiryTimeStamp >= 0 && cacheExpiryTimeStamp < System.currentTimeMillis()) { synchronized(this) { //check if cache expired again if (cacheExpiryTimeStamp < System.currentTimeMillis()) { reset(); } } } return ipList.isIn(ipAddress); } }