Exemplo n.º 1
0
 @Override
 public synchronized void printSetup(PrintWriter pw) {
   pw.println("#\n#  Pool to Pool (P2P)\n#");
   pw.println("pp set max active " + _maxActive);
   pw.println("pp set pnfs timeout " + (_pnfs.getTimeoutInMillis() / 1000L));
   if (_interface != null) {
     pw.println("pp interface " + _interface.getHostAddress());
   }
 }
Exemplo n.º 2
0
 private synchronized PoolMonitor getPoolMonitor() {
   try {
     if (poolMonitor == null) {
       long deadline =
           addWithInfinity(System.currentTimeMillis(), poolManagerStub.getTimeoutInMillis());
       do {
         wait(subWithInfinity(deadline, System.currentTimeMillis()));
       } while (poolMonitor == null || deadline <= System.currentTimeMillis());
       if (poolMonitor == null) {
         throw new RemoteConnectFailureException(
             "Cached pool information is not yet available.", null);
       }
     }
     if (lastRefreshTime < System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(5)) {
       LOGGER.warn("Cached pool information is older than 5 minutes. Please check pool manager.");
     }
     return poolMonitor;
   } catch (InterruptedException e) {
     throw new RemoteProxyFailureException("Failed to fetch pool monitor: " + e.getMessage(), e);
   }
 }
Exemplo n.º 3
0
 private Date getExpirationTimeForPoolSelection() {
   long now = System.currentTimeMillis();
   long timeout = _poolManagerStub.getTimeoutInMillis();
   return new Date(now + 2 * (timeout + RETRY_DELAY));
 }
Exemplo n.º 4
0
 private Date getExpirationTimeForSettingFlag() {
   long now = System.currentTimeMillis();
   long timeout = _poolStub.getTimeoutInMillis();
   return new Date(now + 2 * timeout);
 }
Exemplo n.º 5
0
 private Date getExpirationTimeForNameSpaceLookup() {
   long now = System.currentTimeMillis();
   long timeout = _pnfsStub.getTimeoutInMillis();
   return new Date(now + 2 * (timeout + RETRY_DELAY));
 }