Class StreamFactory
java.lang.Object
org.apache.solr.client.solrj.io.stream.expr.StreamFactory
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DefaultStreamFactory
Used to convert strings into stream expressions
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamFactory(HashMap<String, Supplier<Class<? extends Expressible>>> functionNames) -
Method Summary
Modifier and TypeMethodDescriptionclone()constructComparator(String comparatorString, Class<? extends StreamComparator> comparatorType) constructEqualitor(String equalitorString, Class<? extends StreamEqualitor> equalitorType) constructEvaluator(String expressionClause) constructEvaluator(StreamExpression expression) constructMetric(String expressionClause) constructMetric(StreamExpression expression) constructOperation(String expressionClause) constructOperation(StreamExpression expression) constructPrimitiveObject(String original) constructStream(String expressionClause) constructStream(StreamExpression expression) <T> TcreateInstance(Class<T> clazz, Class<?>[] paramTypes, Object[] params) booleandoesRepresentTypes(StreamExpression expression, Class<?>... clazzes) booleangetBooleanOperand(StreamExpression expression, String paramName, Boolean defaultValue) getCollectionZkHost(String collectionName) getExpressionOperands(StreamExpression expression) getExpressionOperands(StreamExpression expression, String functionName) getExpressionOperandsRepresentingTypes(StreamExpression expression, Class<?>... clazzes) getFunctionName(Class<? extends Expressible> clazz) Map<String, Supplier<Class<? extends Expressible>>> intgetIntOperand(StreamExpression expression, String paramName, Integer defaultValue) getNamedOperand(StreamExpression expression, String name) getNamedOperands(StreamExpression expression) getOperand(StreamExpression expression, int parameterIndex) getOperandsOfType(StreamExpression expression, Class<?>... clazzes) getValueOperand(StreamExpression expression, int parameterIndex) Given an expression, will return the value parameter at the given index, or null if it doesn't existgetValueOperands(StreamExpression expression) booleanisEvaluator(StreamExpression expression) booleanisStream(StreamExpression expression) withCollectionZkHost(String collectionName, String zkHost) withDefaultSort(String sort) withDefaultZkHost(String zkHost) withFunctionName(String functionName, Class<? extends Expressible> clazz) withFunctionName(String functionName, Supplier<Class<? extends Expressible>> clazz) withoutFunctionName(String functionName)
-
Constructor Details
-
StreamFactory
public StreamFactory() -
StreamFactory
-
-
Method Details
-
withCollectionZkHost
-
getDefaultCollection
-
withDefaultZkHost
-
clone
-
withDefaultSort
-
getDefaultSort
-
getDefaultZkHost
-
getCollectionZkHost
-
getFunctionNames
-
withFunctionName
-
withFunctionName
public StreamFactory withFunctionName(String functionName, Supplier<Class<? extends Expressible>> clazz) -
withoutFunctionName
-
getOperand
-
getValueOperands
-
getValueOperand
Given an expression, will return the value parameter at the given index, or null if it doesn't exist -
getNamedOperands
-
getNamedOperand
-
getExpressionOperands
-
getExpressionOperands
public List<StreamExpression> getExpressionOperands(StreamExpression expression, String functionName) -
getOperandsOfType
public List<StreamExpressionParameter> getOperandsOfType(StreamExpression expression, Class<?>... clazzes) -
getExpressionOperandsRepresentingTypes
public List<StreamExpression> getExpressionOperandsRepresentingTypes(StreamExpression expression, Class<?>... clazzes) -
doesRepresentTypes
-
getIntOperand
public int getIntOperand(StreamExpression expression, String paramName, Integer defaultValue) throws IOException - Throws:
IOException
-
getBooleanOperand
public boolean getBooleanOperand(StreamExpression expression, String paramName, Boolean defaultValue) throws IOException - Throws:
IOException
-
constructStream
- Throws:
IOException
-
constructStream
- Throws:
IOException
-
constructMetric
- Throws:
IOException
-
constructMetric
- Throws:
IOException
-
constructComparator
public StreamComparator constructComparator(String comparatorString, Class<? extends StreamComparator> comparatorType) throws IOException - Throws:
IOException
-
constructEqualitor
public StreamEqualitor constructEqualitor(String equalitorString, Class<? extends StreamEqualitor> equalitorType) throws IOException - Throws:
IOException
-
constructOperation
- Throws:
IOException
-
constructOperation
- Throws:
IOException
-
constructEvaluator
- Throws:
IOException
-
constructEvaluator
- Throws:
IOException
-
isStream
- Throws:
IOException
-
isEvaluator
- Throws:
IOException
-
createInstance
public <T> T createInstance(Class<T> clazz, Class<?>[] paramTypes, Object[] params) throws IOException - Throws:
IOException
-
getFunctionName
- Throws:
IOException
-
constructPrimitiveObject
-