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
TKey
The type of the key
TJVMTKey
The 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
TValue
The type of the key
TJVMTValue
The JVM type of the key
Exceptions
Clear()
Clear the current factory
public void Clear()
Clone()
Cones this instance
protected virtual T Clone()
Returns
- T
T
cloned
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
origin
TClone from this original instance
Returns
- T
The instance of
T
clone fromorigin
or new instance iforigin
is 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
propertyName
stringThe property name to be verified
Returns
GetProperty<TData>(string)
Reads the propertyName
set
public TData GetProperty<TData>(string propertyName)
Parameters
propertyName
stringThe property name to be get
Returns
- TData
TData
or default if property does not exists
Type Parameters
TData
The 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
clazz
GenericConfigBuilder<T>