private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }
private Status getStatus() throws ProtocolException { int statusCacheTimeout = ((IMAPStore)store).getStatusCacheTimeout(); // if allowed to cache and our cache is still valid, return it if (statusCacheTimeout > 0 && cachedStatus != null && System.currentTimeMillis() - cachedStatusTime < statusCacheTimeout) return cachedStatus; IMAPProtocol p = null; try { p = getStoreProtocol(); // XXX Status s = p.status(fullName, null); // if allowed to cache, do so if (statusCacheTimeout > 0) { cachedStatus = s; cachedStatusTime = System.currentTimeMillis(); } return s; } finally { releaseStoreProtocol(p); } }