EventDriven
containers instead@Deprecated public class WorkerAdapter extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationListener
IWorker
implementations as beans
providing the same behavior when configured within a Space.
Note, the adapter aims to simplify the migration from "worker" based applications to the new processing unit architecture.
Constructor and Description |
---|
WorkerAdapter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
|
void |
destroy()
Deprecated.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
Deprecated.
|
void |
setActiveWhenBackup(boolean activeWhenBackup)
Deprecated.
Should the worker be active only when the Space is in primary mode.
|
void |
setArgument(String argument)
Deprecated.
Provides an optional argument that will be passed to
IWorker.init(com.j_spaces.core.IJSpace,
String, String) (the last argument). |
void |
setGigaSpace(GigaSpace gigaSpace)
Deprecated.
|
void |
setWorker(IWorker worker)
Deprecated.
Provides the worker implementation that will be run.
|
void |
setWorkerName(String workerName)
Deprecated.
Sets the worker name that will be used as the second parameter to the worker init method.
|
public void setWorker(IWorker worker)
public void setGigaSpace(GigaSpace gigaSpace)
public void setArgument(String argument)
IWorker.init(com.j_spaces.core.IJSpace,
String, String)
(the last argument).public void setWorkerName(String workerName)
public void setActiveWhenBackup(boolean activeWhenBackup)
false
. Setting this to true
means that the worker will start
regardless of the space state.public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
public void onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
onApplicationEvent
in interface org.springframework.context.ApplicationListener
Copyright © GigaSpaces.