-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49cbab4
commit 181c67b
Showing
60 changed files
with
529 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...s/all/src/main/java/org/infinispan/commons/configuration/attributes/AttributeMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.infinispan.commons.configuration.attributes; | ||
|
||
/** | ||
* A way to match attributes to works with types without the need to subclass them to add the @{@link Matchable} interface. | ||
* | ||
* @param <T> | ||
*/ | ||
public interface AttributeMatcher<T> { | ||
AttributeMatcher<Object> TRUE = (o1, o2) -> true; | ||
|
||
static <T> AttributeMatcher<T> alwaysTrue() { | ||
return (AttributeMatcher<T>) TRUE; | ||
} | ||
|
||
boolean matches(Attribute<T> o1, Attribute<T> o2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
core/src/main/java/org/infinispan/cache/impl/AliasCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.infinispan.cache.impl; | ||
|
||
import org.infinispan.AdvancedCache; | ||
|
||
/** | ||
* @since 15.0 | ||
**/ | ||
public class AliasCache<K, V> extends AbstractDelegatingAdvancedCache<K, V> { | ||
private final String alias; | ||
|
||
public AliasCache(AdvancedCache<K, V> cache, String alias) { | ||
super(cache); | ||
this.alias = alias; | ||
} | ||
|
||
@SuppressWarnings("rawtypes") | ||
@Override | ||
public AdvancedCache rewrap(AdvancedCache newDelegate) { | ||
throw new UnsupportedOperationException("Alias caches should not delegate wrapping operations"); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return alias; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.