public class RMGrid<RM extends RemoteMachine> extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
RMGrid.RMC
Context of RemoteMachine
|
static class |
RMGrid.RMInitializer |
(package private) static class |
RMGrid.RMTask1<R,U> |
static interface |
RMGrid.RMTask1Spi<R,U> |
(package private) static class |
RMGrid.RMTask2<R,U,V> |
static interface |
RMGrid.RMTask2Spi<R,U,V> |
(package private) static class |
RMGrid.RMTask3<R,U,V,W> |
static interface |
RMGrid.RMTask3Spi<R,U,V,W> |
Modifier and Type | Field and Description |
---|---|
static String |
DefaultGridListURL |
Constructor and Description |
---|
RMGrid(boolean sh) |
RMGrid(Collection<String> servers,
boolean ssl,
String name,
RMGrid.RMInitializer init) |
Modifier and Type | Method and Description |
---|---|
void |
addMachine(String server,
boolean ssl,
RMI.RemoteMachineSpec spec,
double weight,
double bias,
RMGrid.RMInitializer init) |
void |
addMachine(String server,
boolean ssl,
String name,
String implClass,
String implCodebase,
String[] args,
double weight,
double bias,
RMGrid.RMInitializer init) |
void |
addMachines(Collection<String> servers,
boolean ssl,
RMI.RemoteMachineSpec spec,
RMGrid.RMInitializer init) |
void |
addMachines(Collection<String> servers,
boolean ssl,
String name,
String implClass,
String implCodebase,
String[] args,
RMGrid.RMInitializer init) |
void |
connectMachine(String server,
boolean ssl,
String name,
double weight,
double bias,
RMGrid.RMInitializer init) |
void |
connectMachines(Collection<String> servers,
boolean ssl,
String name,
RMGrid.RMInitializer init) |
static RMGrid<RemoteMachine> |
createRMGrid(Collection<String> servers,
boolean ssl,
String name,
String implClass,
String implCodebase,
String[] args,
RMGrid.RMInitializer init)
Create RMGrid for RemoteMachine interface.
|
static RMGrid<RemoteMachine> |
createRMGrid(Collection<String> servers,
String name,
String implClass,
String implCodebase,
String[] args,
RMGrid.RMInitializer init)
Create RMGrid for RemoteMachine interface.
|
static RMGrid<RemoteMachine> |
createSharableRMGrid(Collection<String> servers,
boolean ssl,
String name,
String implClass,
String implCodebase,
String[] args,
RMGrid.RMInitializer init)
Create RMGrid for RemoteMachine interface.
|
static RMGrid<RemoteMachine> |
createSharableRMGrid(Collection<String> servers,
String name,
String implClass,
String implCodebase,
String[] args,
RMGrid.RMInitializer init)
Create RMGrid for RemoteMachine interface.
|
void |
disconnect()
Disconnect remoteMachines.
|
<R,U> RMResult<R> |
executeTask(RMGrid.RMTask1Spi<R,U> spi,
U arg1)
Execute RMTask (1 argument).
|
<R,U,V> RMResult<R> |
executeTask(RMGrid.RMTask2Spi<R,U,V> spi,
U arg1,
V arg2)
Execute RMTask (2 arguments).
|
<R,U,V,W> RMResult<R> |
executeTask(RMGrid.RMTask3Spi<R,U,V,W> spi,
U arg1,
V arg2,
W arg3)
Execute RMTask (3 arguments).
|
<T> RMResult<T> |
executeTask(RMTask<T> task)
Execute RMTask.
|
boolean |
executeTaskAll(RMTask<Boolean> task)
Execute RMTask on all remote machines.
|
protected RMGrid.RMC |
getRemoteMachineContext() |
boolean |
isEmpty() |
int |
preferredRetries() |
void |
purge()
Purge sharable remoteMachines from registry.
|
void |
showStatistics(PrintStream out)
Show statistics of each remoteMachine registered in this grid.
|
void |
shuffle() |
int |
size() |
void |
standby()
Standby sharable remoteMachines.
|
void |
terminate()
Terminate all remoteMachines registered in this grid.
|
void |
vacuum()
Clean up distributed objects.
|
void |
waitForReady() |
public static final String DefaultGridListURL
public RMGrid(boolean sh)
public RMGrid(Collection<String> servers, boolean ssl, String name, RMGrid.RMInitializer init)
public void addMachine(String server, boolean ssl, RMI.RemoteMachineSpec spec, double weight, double bias, RMGrid.RMInitializer init)
public void addMachine(String server, boolean ssl, String name, String implClass, String implCodebase, String[] args, double weight, double bias, RMGrid.RMInitializer init)
public void addMachines(Collection<String> servers, boolean ssl, RMI.RemoteMachineSpec spec, RMGrid.RMInitializer init)
public void addMachines(Collection<String> servers, boolean ssl, String name, String implClass, String implCodebase, String[] args, RMGrid.RMInitializer init)
public void connectMachine(String server, boolean ssl, String name, double weight, double bias, RMGrid.RMInitializer init)
public void connectMachines(Collection<String> servers, boolean ssl, String name, RMGrid.RMInitializer init)
public void waitForReady()
public int size()
public boolean isEmpty()
public void shuffle()
protected RMGrid.RMC getRemoteMachineContext()
public int preferredRetries()
public <T> RMResult<T> executeTask(RMTask<T> task) throws RemoteException
T
- class of resulttask
- TaskRemoteException
- Remote Exceptionpublic <R,U> RMResult<R> executeTask(RMGrid.RMTask1Spi<R,U> spi, U arg1) throws RemoteException
R
- class of resultU
- class of 1st argumentspi
- Taskarg1
- 1st argumentRemoteException
- Remote Exceptionpublic <R,U,V> RMResult<R> executeTask(RMGrid.RMTask2Spi<R,U,V> spi, U arg1, V arg2) throws RemoteException
R
- class of resultU
- class of 1st argumentV
- class of 2nd argumentspi
- Taskarg1
- 1st argumentarg2
- 2nd argumentRemoteException
- Remote Exceptionpublic <R,U,V,W> RMResult<R> executeTask(RMGrid.RMTask3Spi<R,U,V,W> spi, U arg1, V arg2, W arg3) throws RemoteException
R
- class of resultU
- class of 1st argumentV
- class of 2nd argumentW
- class of 3rd argumentspi
- Taskarg1
- 1st argumentarg2
- 2nd argumentarg3
- 3rd argumentRemoteException
- Remote Exceptionpublic boolean executeTaskAll(RMTask<Boolean> task) throws RemoteException
task
- TaskRemoteException
- Remote Exceptionpublic void disconnect() throws RemoteException, NotBoundException
RemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic void purge() throws RemoteException, NotBoundException
RemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic void standby() throws RemoteException, NotBoundException
RemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic void vacuum()
public void showStatistics(PrintStream out) throws RemoteException, NotBoundException
out
- output.RemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic void terminate() throws RemoteException, NotBoundException
RemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic static RMGrid<RemoteMachine> createRMGrid(Collection<String> servers, boolean ssl, String name, String implClass, String implCodebase, String[] args, RMGrid.RMInitializer init) throws RemoteException, NotBoundException
servers
- server listssl
- SSLname
- machine nameimplClass
- class nameimplCodebase
- code baseargs
- argumentsinit
- initializerRemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic static RMGrid<RemoteMachine> createRMGrid(Collection<String> servers, String name, String implClass, String implCodebase, String[] args, RMGrid.RMInitializer init) throws RemoteException, NotBoundException
servers
- server listname
- machine nameimplClass
- class nameimplCodebase
- code baseargs
- argumentsinit
- initializerRemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic static RMGrid<RemoteMachine> createSharableRMGrid(Collection<String> servers, boolean ssl, String name, String implClass, String implCodebase, String[] args, RMGrid.RMInitializer init) throws RemoteException, NotBoundException
servers
- server listssl
- SSLname
- machine nameimplClass
- class nameimplCodebase
- code baseargs
- argumentsinit
- initializerRemoteException
- Remote ExceptionNotBoundException
- Not Bound Exceptionpublic static RMGrid<RemoteMachine> createSharableRMGrid(Collection<String> servers, String name, String implClass, String implCodebase, String[] args, RMGrid.RMInitializer init) throws RemoteException, NotBoundException
servers
- server listname
- machine nameimplClass
- class nameimplCodebase
- code baseargs
- argumentsinit
- initializerRemoteException
- Remote ExceptionNotBoundException
- Not Bound ExceptionEDB Working Group at Tue Jun 10 17:08:59 JST 2025