https://github.com/forge/infinispan-addon
Infinispan Forge Addon
https://github.com/forge/infinispan-addon
Last synced: 5 months ago
JSON representation
Infinispan Forge Addon
- Host: GitHub
- URL: https://github.com/forge/infinispan-addon
- Owner: forge
- License: apache-2.0
- Created: 2017-07-17T21:30:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T21:38:02.000Z (over 8 years ago)
- Last Synced: 2025-01-21T08:44:31.231Z (about 1 year ago)
- Language: Java
- Size: 8.79 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE
Awesome Lists containing this project
README
== Infinispan
:idprefix: id_
This addon provides *standalone* functionality.
=== Depends on
[options="header"]
|===
|Addon |Exported |Optional
|javaee-spi
|yes
|no
|org.jboss.forge.furnace.container:cdi
|no
|no
|===
== Setup
This addon requires the following installation steps.
=== Add configuration to pom.xml
To use this addon, you must add it as a dependency in the *pom.xml* of your `forge-addon` classified artifact:
[source,xml]
----
org.jboss.forge.addon
infinispan
forge-addon
${version}
----
== Features
Injection of CacheManager:: This addon allows you to instantiate Cache objects from the CacheManager.
+
[source,java]
----
@Inject private CacheManager manager;
...
Cache cache = manager.createCache("default", new MutableConfiguration().setStoreByValue(false));
cache.put("foo","bar");
Assert.assertEquals("bar",cache.get("foo"));
----
+
[TIP]
====
If your addon uses a container that does not support "@Inject" annotations, services such as the `AddonManager` may also be
accessed via the `AddonRegistry`:
----
AddonRegistry registry = ...
Imported imported = registry.getServices(CacheManager.class);
CacheManager manager = imported.get();
----
====