private void addPartitionType(PartitionType partitionType) {

        String partitionedStream = partitionType.getStreamId();
        if (partitionTypeMap.containsKey(partitionedStream)) {
            throw new SiddhiAppValidationException("Duplicate partition for Stream " + partitionedStream + "!, "
                    + partitionType.toString() + " cannot be added as " + partitionTypeMap.get(partitionType
                    .getStreamId()) + " already exist.", partitionType.getQueryContextStartIndex(),
                    partitionType.getQueryContextEndIndex());
        }
        partitionTypeMap.put(partitionType.getStreamId(), partitionType);
    }
{@linkplain io.siddhi.query.api.execution.partition.Partition} class is used to represent the definition of
a partition for a Siddhi instance.
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/execution/partition/Partition.java