Package com.hazelcast.spring
Annotation Interface ExposeHazelcastObjects
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Import({HazelcastExposeObjectRegistrar.class,HazelcastObjectExtractionConfiguration.class})
public @interface ExposeHazelcastObjects
Annotation that instruments Spring to expose Hazelcast objects as beans.
Using this annotation on your configuration will register beans of:
- JetService
- SqlService
- Data structures, such as
IMap
,ReplicatedMap
,ITopic
.
- via static Java configuration (when starting the cluster with new
Config
object). - via dynamic Java configuration (e.g. when configured using
instance.getConfig().addMapConfig
). Note that the autowiring is done once; therefore dynamically added configuration afterApplicationContext
is initialized on one member will be used to autowire objects on newly created member, but not on the member that added the dynamic configuration - via XML/YAML static configuration
- Since:
- 6.0
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]
Specifies which objects will not be exposed as Spring beans.Class<?>[]
Specifies which types of objects won't be exposed as Spring beans.String[]
Specifies which (by name) objects will be exposed as Spring beans.Class<?>[]
Specifies which types of objects will be exposed as Spring beans.
-
Element Details
-
includeByName
String[] includeByNameSpecifies which (by name) objects will be exposed as Spring beans.By default, all objects listed in
ExposeHazelcastObjects
are exposed, this option allows user to narrow the functionality to only some part of objects.- Default:
- {}
-
excludeByName
String[] excludeByNameSpecifies which objects will not be exposed as Spring beans.By default, all objects listed in
ExposeHazelcastObjects
are exposed, this option allows user to narrow the functionality and exclude unwanted objects from being added as Spring beans.- Default:
- {}
-
includeByType
Class<?>[] includeByTypeSpecifies which types of objects will be exposed as Spring beans.By default, all objects will be included.
- Default:
- {}
-
excludeByType
Class<?>[] excludeByTypeSpecifies which types of objects won't be exposed as Spring beans.By default, no type is excluded.
- Default:
- {}
-