public interface IHomeLayout
com.zfabrik.homeLayout.
When starting a z2 environment in server mode (as compared to embedded, see ProcessRunner)
the home layout determines the worker processes (see IWorkerProcess) to be started and
managed by the home process.
A home layout component has no further resources. Typically a home layout definition looks like the following properties set:
com.zfabrik.component.type=com.zfabrik.homeLayout home.workers=<name of worker process component 1>, <name of worker process component 2>, ...During startup, the home process identifies its home layout via the system property
com.zfabrik.home.layout (see also Foundation.HOME_LAYOUT_COMPONENT).
The home layout (see above) provides the list of worker processes to manage. See
IWorkerProcess for more information about worker processes.
This interface allows to send messages to worker processes from the home process. It is hence mostly used internally and should not be used be applications.
See HomeHandle for a worker process perspective onto the running
home layout.
| Modifier and Type | Field and Description |
|---|---|
static int |
SCOPE_CLUSTER
broadcast scope: send invalidation out to the cluster
|
static int |
SCOPE_GLOBAL
broadcast scope: local home process
|
static int |
SCOPE_HOME
broadcast scope: local home process
|
static int |
SCOPE_OTHERS
broadcast scope: exclude the sending worker process
|
static int |
SCOPE_WORKERS
broadcast scope: all worker processes in home
|
static String |
TYPE |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcastInvalidations(Collection<String> invs,
long timeout,
int scope,
String senderWorker)
broadcast resource invalidations to all worker processes of a home and, if specified, to all
homes and workers in a cluster.
|
void |
broadcastMessage(Map<String,Serializable> args,
long timeout)
broadcast a message to all worker processes of a home.
|
void |
broadcastMessage(Map<String,Serializable> args,
long timeout,
boolean killOnTimeOut)
broadcast a message to all worker processes of a home
|
void |
start() |
static final String TYPE
static final int SCOPE_HOME
static final int SCOPE_WORKERS
static final int SCOPE_OTHERS
static final int SCOPE_CLUSTER
static final int SCOPE_GLOBAL
void broadcastMessage(Map<String,Serializable> args, long timeout) throws IOException
args - timeout - timeout per worker or -1 for defaultIOExceptionvoid broadcastMessage(Map<String,Serializable> args, long timeout, boolean killOnTimeOut) throws IOException
args - timeout - timeout per worker or -1 for defaultkillOnTimeOut - if true a time out will lead to a worker process termination.IOExceptionvoid broadcastInvalidations(Collection<String> invs, long timeout, int scope, String senderWorker) throws IOException
args - timeout - timeout per worker or -1 for defaultIOExceptionvoid start()