コード例 #1
0
 @TestOnly
 public void releaseInTests() {
   MavenServerIndexer w = getWrappee();
   if (w == null) return;
   try {
     w.release();
   } catch (RemoteException e) {
     handleRemoteError(e);
   }
 }
コード例 #2
0
  public synchronized void releaseIndex(int localId) throws MavenServerIndexerException {
    IndexData data = myDataMap.remove(localId);
    if (data == null) {
      MavenLog.LOG.warn("index " + localId + " not found");
      return;
    }

    // was invalidated on error
    if (data.remoteId == -1) return;

    MavenServerIndexer w = getWrappee();
    if (w == null) return;

    try {
      w.releaseIndex(data.remoteId);
    } catch (RemoteException e) {
      handleRemoteError(e);
    }
  }