java.lang.Object
io.lettuce.core.dynamic.segment.CommandSegments
- All Implemented Interfaces:
Iterable<CommandSegment>
public class CommandSegments extends Object implements Iterable<CommandSegment>
Value object abstracting multiple
CommandSegments.- Since:
- 5.0
- Author:
- Mark Paluch
-
Constructor Summary
Constructors Constructor Description CommandSegments(List<CommandSegment> segments) -
Method Summary
Modifier and Type Method Description ProtocolKeywordgetCommandType()Iterator<CommandSegment>iterator()protected ProtocolKeywordpotentiallyResolveCommand(String commandType)Attempt to resolve thecommandTypeagainstCommandType.intsize()StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CommandSegments
- Parameters:
segments- must not benull.
-
-
Method Details
-
potentiallyResolveCommand
Attempt to resolve thecommandTypeagainstCommandType. This allows reuse of settings associated with the actual command type such as read-write routing. Subclasses may override this method.- Parameters:
commandType- must not benull.- Returns:
- the resolved
ProtocolKeyword. - Since:
- 5.0.5
-
iterator
- Specified by:
iteratorin interfaceIterable<CommandSegment>
-
getCommandType
-
size
public int size() -
toString
-