public abstract class PipelineComponentConfiguration<C extends PipelineComponentConfiguration<C>> extends Object
Implementations must have a zero argument constructor.
Constructor and Description |
---|
PipelineComponentConfiguration() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Default implementation for testing equality using all
non-static, non-transient class fields including private ones.
|
protected PipelineComponentContext |
getComponentContext()
Used to access the component's context
|
InstanceId |
getInstanceId()
Used to access the component's instance ID
|
int |
hashCode()
Default implementation for calculating the HashCode using all
non-static, non-transient class fields including private ones.
|
boolean |
isFullAcquisitionRequired(C oldConfiguration)
Indicates whether a full acquisition is required.
|
void |
setComponentContext(PipelineComponentContext componentContext)
Called immediately after the Configuration is instantiated
to set up the context for this component.
|
void |
setInstanceId(InstanceId instanceId)
Called after the configuration is instantiated to set the
instance ID for this component.
|
List<ValidationFailure> |
validate()
Validates a configuration after validation of the specifications from the annotations
has already been done.
|
public boolean isFullAcquisitionRequired(C oldConfiguration)
newConfiguration
.
The component must indicate whether a saved configuration change should
invalidate any previous acquisitions performed with the old
configuration. If a call to this method returns true
and the
DataSourceRuntime
constructed with this new
configuration implements IncrementalDataSourceRuntime
, then CAS will not call
IncrementalDataSourceRuntime.runIncrementalAcquisition()
, but only call
DataSourceRuntime.runFullAcquisition()
. If the
DataSourceRuntime does not implement IncrementalDataSourceRuntime
,
then CAS will clear its record of any previous acquisitions before calling
runFullAcquisition()
.
The default implementation will return true if any field in the configuration object is different.
This is done using reflection.oldConfiguration
- the previous version of the configurationpublic List<ValidationFailure> validate()
public final void setComponentContext(PipelineComponentContext componentContext)
componentContext
- context for the componentprotected final PipelineComponentContext getComponentContext()
public final void setInstanceId(InstanceId instanceId)
instanceId
- instance ID for the componentpublic final InstanceId getInstanceId()
public boolean equals(Object obj)
Default implementation for testing equality using all non-static, non-transient class fields including private ones. It does not include the PipelineComponentContext object for the test.
It uses AccessibleObject.setAccessible
to gain access
to private fields. This means that it will throw a security exception
if run under a security manager, if the permissions are not set up
correctly. It is also not as efficient as testing explicitly.
public int hashCode()
Default implementation for calculating the HashCode using all non-static, non-transient class fields including private ones. It does not include the PipelineComponentContext as a part of the HashCode
It uses AccessibleObject.setAccessible
to gain access
to private fields. This means that it will throw a security exception
if run under a security manager, if the permissions are not set up
correctly. It is also not as efficient as testing explicitly.
Copyright © 2007, 2015, Oracle and/or its affiliates. All rights reserved.