Package fish.payara.cluster
Annotation Type Clustered
-
@Documented @Inherited @Retention(RUNTIME) @Target(TYPE) public @interface Clustered
This annotation can be added to @Singleton EJB beans and @ApplicationScoped CDI beans to specify that they are cluster-wide singletons, not just a singleton per server instance- Author:
- lprimak
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancallPostConstructOnAttachSpecifies whether to call @PostConstruct when the singleton is attached to a cluster and this singleton already exists on the other node.booleancallPreDestroyOnDetachSpecifies whether to call @PreDestroy when the singleton is detached from a cluster and this singleton also exists on the other node.StringkeyNamekey in the distributed map to bind this clustered object to.DistributedLockTypelockspecifies the type of distributed locking to be performed For EJB beans, only INHERIT and LOCK_NONE are valid for CDI beans, INHERIT is equivalent to NONE, and the other valid value for CDI beans is LOCK
-
-
-
Element Detail
-
keyName
String keyName
key in the distributed map to bind this clustered object to. Default is the name of the bean- Default:
- ""
-
-
-
lock
DistributedLockType lock
specifies the type of distributed locking to be performed For EJB beans, only INHERIT and LOCK_NONE are valid for CDI beans, INHERIT is equivalent to NONE, and the other valid value for CDI beans is LOCK- Default:
- fish.payara.cluster.DistributedLockType.INHERIT
-
-