Class SimpleMarshallingConfigurationRepository
- java.lang.Object
-
- org.wildfly.clustering.marshalling.jboss.SimpleMarshallingConfigurationRepository
-
- All Implemented Interfaces:
MarshallingConfigurationRepository
public class SimpleMarshallingConfigurationRepository extends Object implements MarshallingConfigurationRepository
SimpleMarshallingConfigurationRepositoryimplementation based on an array ofMarshallingConfigurations. Marshalling versions, while arbitrary, are sequential by convention; and start at 1, not 0, for purely historical reasons.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description SimpleMarshallingConfigurationRepository(Class<E> enumClass, E current, C context)Create a marshalling configuration repository using the specified enumeration of marshalling configuration suppliers.SimpleMarshallingConfigurationRepository(org.jboss.marshalling.MarshallingConfiguration... configurations)Create a marshalling configuration repository using the specified marshalling configurations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentMarshallingVersion()org.jboss.marshalling.MarshallingConfigurationgetMarshallingConfiguration(int version)
-
-
-
Constructor Detail
-
SimpleMarshallingConfigurationRepository
public SimpleMarshallingConfigurationRepository(Class<E> enumClass, E current, C context)
Create a marshalling configuration repository using the specified enumeration of marshalling configuration suppliers.- Parameters:
enumClass- an enum classcurrent- the supplier of the current marshalling configurationcontext- the context with which to obtain the marshalling configuration
-
SimpleMarshallingConfigurationRepository
public SimpleMarshallingConfigurationRepository(org.jboss.marshalling.MarshallingConfiguration... configurations)
Create a marshalling configuration repository using the specified marshalling configurations. The current version is always the last.- Parameters:
configurations-
-
-
Method Detail
-
getCurrentMarshallingVersion
public int getCurrentMarshallingVersion()
- Specified by:
getCurrentMarshallingVersionin interfaceMarshallingConfigurationRepository
-
getMarshallingConfiguration
public org.jboss.marshalling.MarshallingConfiguration getMarshallingConfiguration(int version)
- Specified by:
getMarshallingConfigurationin interfaceMarshallingConfigurationRepository
-
-