Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Auto discovery embedded cache configurations #29#30

Merged
slaskawi merged 1 commit intoinfinispan:masterfrom
lburgazzoli:cache-configuration
May 31, 2017
Merged

Auto discovery embedded cache configurations #29#30
slaskawi merged 1 commit intoinfinispan:masterfrom
lburgazzoli:cache-configuration

Conversation

@lburgazzoli
Copy link
Copy Markdown
Contributor

No description provided.

@slaskawi
Copy link
Copy Markdown
Contributor

@lburgazzoli
Copy link
Copy Markdown
Contributor Author

Does the remote cache support multiple configurations ?
Or in this case is just to lookup the remote cache configuration and apply it ?

@slaskawi
Copy link
Copy Markdown
Contributor

slaskawi commented May 25, 2017 via email

@lburgazzoli
Copy link
Copy Markdown
Contributor Author

Should the InfinispanRemoteConfigurer be deprecated ?

It could be nice to add also an InfinispanRemoteConfigrationCustomizer, like:

@FunctionalInterface
public interface InfinispanRemoteConfigrationCustomizer {
    void configure(final ConfigurationBuilder builder);
}

Then the Configuration bean lookup would happen as last step if none of the current steps succeed and finally the customizers are triggered.

Make any sense ?

@lburgazzoli lburgazzoli force-pushed the cache-configuration branch from ce7a0b4 to d677446 Compare May 25, 2017 15:59
@slaskawi
Copy link
Copy Markdown
Contributor

+1, makes sense.

import infinispan.autoconfigure.common.InfinispanProperties;

public class InfinispanRemoteCacheManagerChecker implements Condition {
public static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this logger is not used.


### Customization

You can further customize the cache manager by creating beans of types `InfinispanCacheConfigurer` and/or `InfinispanGlobalConfigurer`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For symmetry reasons, I think we should also create customizers (probably both global and per cache). This way everything will be consistent.

README.adoc Outdated
[source,java]
.Example
----
@Order(Ordered.HIGHEST_PRECEDENCE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need @Order here?

@lburgazzoli lburgazzoli force-pushed the cache-configuration branch from d677446 to e1e62bf Compare May 29, 2017 09:45
@lburgazzoli
Copy link
Copy Markdown
Contributor Author

I've pushed a new version with requested changes

@slaskawi slaskawi merged commit f7a77f1 into infinispan:master May 31, 2017
@slaskawi
Copy link
Copy Markdown
Contributor

Thanks a lot @lburgazzoli! Awesome work!

@lburgazzoli lburgazzoli deleted the cache-configuration branch May 31, 2017 07:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants