Class SimpleMarshallingConfigurationRepository
java.lang.Object
org.wildfly.clustering.marshalling.jboss.SimpleMarshallingConfigurationRepository
- All Implemented Interfaces:
MarshallingConfigurationRepository
public class SimpleMarshallingConfigurationRepository
extends Object
implements MarshallingConfigurationRepository
Simple
MarshallingConfigurationRepository implementation based on an array of MarshallingConfigurations.
Marshalling versions, while arbitrary, are sequential by convention; and start at 1, not 0, for purely historical reasons.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMarshallingConfigurationRepository(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
Modifier and TypeMethodDescriptionintorg.jboss.marshalling.MarshallingConfigurationgetMarshallingConfiguration(int version)
-
Constructor Details
-
SimpleMarshallingConfigurationRepository
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 Details
-
getCurrentMarshallingVersion
public int getCurrentMarshallingVersion()- Specified by:
getCurrentMarshallingVersionin interfaceMarshallingConfigurationRepository
-
getMarshallingConfiguration
public org.jboss.marshalling.MarshallingConfiguration getMarshallingConfiguration(int version) - Specified by:
getMarshallingConfigurationin interfaceMarshallingConfigurationRepository
-