public class InterceptorConfigurationBuilder extends AbstractCustomInterceptorsConfigurationChildBuilder implements Builder<InterceptorConfiguration>
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> |
after |
private java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> |
before |
private int |
index |
private org.infinispan.interceptors.base.CommandInterceptor |
interceptor |
private static org.infinispan.util.logging.Log |
log |
private InterceptorConfiguration.Position |
position |
private java.util.Properties |
properties |
Constructor and Description |
---|
InterceptorConfigurationBuilder(CustomInterceptorsConfigurationBuilder builder) |
Modifier and Type | Method and Description |
---|---|
InterceptorConfigurationBuilder |
addProperty(java.lang.String key,
java.lang.String value) |
InterceptorConfigurationBuilder |
after(java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> after)
Dictates that the custom interceptor appears immediately after the specified interceptor.
|
InterceptorConfigurationBuilder |
before(java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> before)
Dictates that the custom interceptor appears immediately before the specified interceptor.
|
InterceptorConfigurationBuilder |
clearProperties()
Clears the interceptor properties
|
InterceptorConfiguration |
create()
Create the configuration bean
|
InterceptorConfigurationBuilder |
index(int i)
Specifies a position in the interceptor chain to place the new interceptor.
|
InterceptorConfigurationBuilder |
interceptor(org.infinispan.interceptors.base.CommandInterceptor interceptor)
An instance of the new custom interceptor to add to the configuration.
|
InterceptorConfigurationBuilder |
position(InterceptorConfiguration.Position p)
Specifies a position, denoted by the
InterceptorConfiguration.Position enumeration, where to place the new interceptor. |
InterceptorConfigurationBuilder |
read(InterceptorConfiguration template)
Reads the configuration from an already created configuration bean into this builder.
|
InterceptorConfigurationBuilder |
removeProperty(java.lang.String key) |
java.lang.String |
toString() |
void |
validate()
Validate the data in this builder before building the configuration bean
|
InterceptorConfigurationBuilder |
withProperties(java.util.Properties properties)
Sets interceptor properties
|
getCustomInterceptorsBuilder
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, getBuilder, indexing, invocationBatching, jmxStatistics, locking, persistence, security, sites, storeAsBinary, transaction, unsafe, versioning
private static final org.infinispan.util.logging.Log log
private java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> after
private java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> before
private org.infinispan.interceptors.base.CommandInterceptor interceptor
private int index
private InterceptorConfiguration.Position position
private java.util.Properties properties
InterceptorConfigurationBuilder(CustomInterceptorsConfigurationBuilder builder)
public InterceptorConfigurationBuilder after(java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> after)
CacheConfigurationException
will be thrown when the
cache starts.after
- the class of the interceptor to look forpublic InterceptorConfigurationBuilder before(java.lang.Class<? extends org.infinispan.interceptors.base.CommandInterceptor> before)
CacheConfigurationException
will be thrown when the
cache starts.before
- the class of the interceptor to look forpublic InterceptorConfigurationBuilder interceptor(org.infinispan.interceptors.base.CommandInterceptor interceptor)
interceptor
- an instance of CommandInterceptor
public InterceptorConfigurationBuilder index(int i)
IllegalArgumentException
is thrown if the index is
less than 0 or greater than the maximum number of interceptors in the chain.i
- positional index in the interceptor chain to place the new interceptor.public InterceptorConfigurationBuilder position(InterceptorConfiguration.Position p)
InterceptorConfiguration.Position
enumeration, where to place the new interceptor.p
- position to place the new interceptorpublic InterceptorConfigurationBuilder withProperties(java.util.Properties properties)
public InterceptorConfigurationBuilder clearProperties()
public InterceptorConfigurationBuilder addProperty(java.lang.String key, java.lang.String value)
public InterceptorConfigurationBuilder removeProperty(java.lang.String key)
public void validate()
Builder
validate
in interface Builder<InterceptorConfiguration>
public InterceptorConfiguration create()
Builder
create
in interface Builder<InterceptorConfiguration>
public InterceptorConfigurationBuilder read(InterceptorConfiguration template)
Builder
read
in interface Builder<InterceptorConfiguration>
template
- the configuration from which to "clone" this config if needed.public java.lang.String toString()
toString
in class java.lang.Object