-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d74fd8a
commit 369f3dc
Showing
7 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...src/main/java/diskCacheV111/vehicles/PoolManagerGetPoolsBySourcePoolPoolGroupMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package diskCacheV111.vehicles; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
public class PoolManagerGetPoolsBySourcePoolPoolGroupMessage | ||
extends PoolManagerGetPoolsMessage { | ||
|
||
private static final long serialVersionUID = 4423670920097918847L; | ||
|
||
private final String _sourcePool; | ||
|
||
public PoolManagerGetPoolsBySourcePoolPoolGroupMessage(String sourcePool) { | ||
_sourcePool = requireNonNull(sourcePool); | ||
} | ||
|
||
public String getSourcePool() { | ||
return _sourcePool; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
modules/dcache/src/main/java/org/dcache/pool/migration/PoolListBySourcePoolPoolGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.dcache.pool.migration; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
import com.google.common.util.concurrent.MoreExecutors; | ||
import diskCacheV111.vehicles.PoolManagerGetPoolsBySourcePoolPoolGroupMessage; | ||
import org.dcache.cells.CellStub; | ||
|
||
class PoolListBySourcePoolPoolGroup | ||
extends PoolListFromPoolManager { | ||
|
||
private final CellStub _poolManager; | ||
private final String _sourcePool; | ||
|
||
public PoolListBySourcePoolPoolGroup(CellStub poolManager, String sourcePool) { | ||
_poolManager = requireNonNull(poolManager); | ||
_sourcePool = requireNonNull(sourcePool); | ||
} | ||
|
||
@Override | ||
public void refresh() { | ||
CellStub.addCallback( | ||
_poolManager.send(new PoolManagerGetPoolsBySourcePoolPoolGroupMessage(_sourcePool)), | ||
this, MoreExecutors.directExecutor()); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return String.format("source pool %s, %d pools", | ||
_sourcePool, _pools.size()); | ||
} | ||
} |