- Type Parameters:
S- the source type as one of
DataInputor other classes documented in
- Enclosing class:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface protected static interface DataStoreProvider.Prober<S>
An action to execute for testing if a
StorageConnectorinput can be read. This action is invoked by
DataStoreProvider.probeContent(StorageConnector, Class, Prober)with an input of the type
<S>specified to the
DataStoreProvideris responsible for restoring the input to its initial position after the probe action completed.
- See Also:
Method SummaryModifier and TypeMethodDescriptionReturns a composed probe that attempts, in sequence, this probe followed by the alternative probe if the first probe can not be executed.Probes the given input and returns an indication about whether that input is supported.
testProbes the given input and returns an indication about whether that input is supported. This method may return
SUPPORTEDif there is reasonable chance of success based on a brief inspection of the given input; the supported status does not need to be guaranteed.
input- the input to probe. This is for example a
- the result of executing the probe action with the given source. Should not be null.
Exception- if an error occurred during the execution of the probe action.
orElsedefault <A> DataStoreProvider.Prober<S> orElse
(Class<A> type, DataStoreProvider.Prober<? super A> alternative)Returns a composed probe that attempts, in sequence, this probe followed by the alternative probe if the first probe can not be executed. The alternative probe is tried if and only if one of the following conditions is true:
- Type Parameters:
A- the compile-time type of the
typeargument (the source or storage type).
type- the desired type as one of
alternative- the test to apply on the source of the given type.
- a composed probe that attempts the given probe if this probe can not be executed.