public class StoredIDDataConnector extends ComputedIDDataConnector
StoredPersistentIdGenerationStrategy
that makes use of a JDBCPersistentIdStoreEx.| Modifier and Type | Field and Description |
|---|---|
private JDBCPersistentIdStoreEx |
idStore
The
JDBCPersistentIdStoreEx used to manage IDs. |
private org.slf4j.Logger |
log
Class logger.
|
private StoredPersistentIdGenerationStrategy |
storedIdStrategy
Persistent ID generation mechanism.
|
| Constructor and Description |
|---|
StoredIDDataConnector()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,IdPAttribute> |
doDataConnectorResolve(net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext resolutionContext,
net.shibboleth.idp.attribute.resolver.context.AttributeResolverWorkContext workContext) |
protected void |
doDestroy() |
protected void |
doInitialize() |
DataSource |
getDataSource()
Get the
DataSource used to communicate with the database. |
boolean |
getFailFast()
Get whether to allow startup if the database cannot be verified.
|
long |
getQueryTimeout()
Get the SQL query timeout.
|
Collection<String> |
getRetryableErrors()
Get the error messages to check for classifying a driver error as retryable, generally indicating
a lock violation or duplicate insert that signifies a broken database.
|
JDBCPersistentIdStoreEx |
getStoredIDStore()
Get the data store used to manage stored IDs.
|
int |
getTransactionRetries()
Get the number of retries to attempt for a failed transaction.
|
void |
setDataSource(DataSource source)
Set the
DataSource used to communicate with the database. |
void |
setFailFast(boolean flag)
Set whether to allow startup if the database cannot be verified.
|
void |
setQueryTimeout(long timeout)
Set the SQL query timeout.
|
void |
setRetryableErrors(Collection<String> errors)
Set the error messages to check for classifying a driver error as retryable, generally indicating
a lock violation or duplicate insert that signifies a broken database.
|
void |
setTransactionRetries(int retries)
Set the number of retries to attempt for a failed transaction.
|
clearComputedIdStrategy, getComputedIdStrategy, getEncoding, getSalt, setAlgorithm, setEncoding, setSalt, setSaltencodeAsAttribute, getGeneratedAttributeId, getSourceAttributeId, resolveSourceAttribute, setGeneratedAttributeId, setSourceAttributeIddoResolve, getFailoverDataConnectorId, getLastFail, getLogPrefix, getNoRetryDelay, setFailoverDataConnectorId, setLastFail, setNoRetryDelayequals, getActivationCondition, getDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setDependencies, setProfileContextStrategy, setPropagateResolutionExceptionssetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetActivationCondition, getDependencies, isPropagateResolutionExceptions, resolveinitialize, isInitializeddestroy, isDestroyedgetId@Nonnull private final org.slf4j.Logger log
@Nonnull private final JDBCPersistentIdStoreEx idStore
JDBCPersistentIdStoreEx used to manage IDs.@Nonnull private final StoredPersistentIdGenerationStrategy storedIdStrategy
@NonnullAfterInit public DataSource getDataSource()
DataSource used to communicate with the database.DataSourcepublic void setDataSource(@Nonnull DataSource source)
DataSource used to communicate with the database.source - the DataSource.@Nonnull public JDBCPersistentIdStoreEx getStoredIDStore()
@Nonnull @NonnullElements public Collection<String> getRetryableErrors()
public void setRetryableErrors(@Nullable@NonnullElements Collection<String> errors)
errors - retryable messages@Duration @NonNegative public long getQueryTimeout()
@Duration public void setQueryTimeout(@Duration@NonNegative long timeout)
timeout - the timeout to set in secondspublic int getTransactionRetries()
public void setTransactionRetries(@NonNegative int retries)
retries - the number of retriespublic boolean getFailFast()
public void setFailFast(boolean flag)
Verification consists not only of a liveness check, but the successful insertion of a dummy row, a failure to insert a duplicate, and then deletion of the row.
flag - flag to setprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class ComputedIDDataConnectorComponentInitializationExceptionprotected void doDestroy()
doDestroy in class ComputedIDDataConnector@Nullable protected Map<String,IdPAttribute> doDataConnectorResolve(@Nonnull net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext resolutionContext, @Nonnull net.shibboleth.idp.attribute.resolver.context.AttributeResolverWorkContext workContext) throws net.shibboleth.idp.attribute.resolver.ResolutionException
doDataConnectorResolve in class ComputedIDDataConnectornet.shibboleth.idp.attribute.resolver.ResolutionExceptionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.