Class GenericConfigBuilder<T>
Generic base configuration class
public class GenericConfigBuilder<T> : INotifyPropertyChanged, IGenericSerDesFactory, IDisposable where T : GenericConfigBuilder<T>, new()
Type Parameters
T
- Inheritance
-
GenericConfigBuilder<T>
- Implements
- Derived
- Inherited Members
Properties
AutoSelectBuffered
Set to true to automatically fallback to SerDesBuffered<T> when the JVM type is ByteBuffer
public bool AutoSelectBuffered { get; set; }
Property Value
Remarks
The property is by default true to optimized data flow between CLR and JVM
KeySerDesSelector
The Type used to create an instance of ISerDesSelector<T> for keys with BuildKeySerDes<TKey, TJVMTKey>()
public Type KeySerDesSelector { get; set; }
Property Value
ValueSerDesSelector
The Type used to create an instance of ISerDesSelector<T> for values with BuildValueSerDes<TValue, TJVMTValue>()
public Type ValueSerDesSelector { get; set; }
Property Value
Methods
BuildKeySerDes<TKey, TJVMTKey>()
Builds an instance of ISerDes<T, TJVMT> using the Type defined in KeySerDesSelector
public ISerDes<TKey, TJVMTKey> BuildKeySerDes<TKey, TJVMTKey>()
Returns
- ISerDes<TKey, TJVMTKey>
An instance of ISerDes<T, TJVMT>
Type Parameters
TKeyThe type of the key
TJVMTKeyThe JVM type of the key
Exceptions
BuildValueSerDes<TValue, TJVMTValue>()
Builds an instance of ISerDes<T, TJVMT> using the Type defined in ValueSerDesSelector
public ISerDes<TValue, TJVMTValue> BuildValueSerDes<TValue, TJVMTValue>()
Returns
- ISerDes<TValue, TJVMTValue>
An instance of ISerDes<T, TJVMT>
Type Parameters
TValueThe type of the key
TJVMTValueThe JVM type of the key
Exceptions
Clear()
Clear the current factory
public void Clear()
Clone()
Cones this instance
protected virtual T Clone()
Returns
- T
Tcloned
Create()
Creates an instance of T
public static T Create()
Returns
- T
The instance of
T
CreateFrom(T)
Creates an instance of T
public static T CreateFrom(T origin)
Parameters
originTClone from this original instance
Returns
- T
The instance of
Tclone fromoriginor new instance iforiginis null
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ExistProperty(string)
Verify if the propertyName was previously set
public bool ExistProperty(string propertyName)
Parameters
propertyNamestringThe property name to be verified
Returns
GetProperty<TData>(string)
Reads the propertyName set
public TData GetProperty<TData>(string propertyName)
Parameters
propertyNamestringThe property name to be get
Returns
- TData
TDataor default if property does not exists
Type Parameters
TDataThe propert type
SetProperty(string, object)
Set the propertyName with value
public void SetProperty(string propertyName, object value)
Parameters
ToMap()
Returns the Map<K, V> from the T instance
public Map<String, String> ToMap()
Returns
ToProperties()
Returns the Properties from the T instance
public Properties ToProperties()
Returns
- Properties
Properties containing the properties
Events
PropertyChanged
Occurs when a property value changes.
public event PropertyChangedEventHandler PropertyChanged
Event Type
Operators
implicit operator Properties(GenericConfigBuilder<T>)
Converts GenericConfigBuilder<T> into Properties
public static implicit operator Properties(GenericConfigBuilder<T> clazz)
Parameters
clazzGenericConfigBuilder<T>