package com.tinkerpop.blueprints.strategy;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;

/**
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */

public class PartitionStrategy implements Strategy {

    private String writePartition;
    private final String partitionKey;

    public PartitionStrategy(final String partitionKey, final String partition) {
        this.writePartition = partition;
        this.partitionKey = partitionKey;
    }

    @Override
    public Function<Object[], Object[]> getPreAddVertex() {
        return (args) -> {
            final List<Object> o = new ArrayList<>(Arrays.asList(args));
            o.addAll(Arrays.asList(this.partitionKey, writePartition));
            return o.toArray();
        };
    }
}
@@ -107,19 +107,97 @@
 va.util.
-Lis
+Collections;%0Aimport java.util.HashSet;%0Aimport java.util.List;%0Aimport java.util.Se
 t;%0Aimpor
@@ -295,17 +295,16 @@
 om)%0A */%0A
-%0A
 public c
@@ -422,16 +422,80 @@
 tionKey;
+%0A    private final Set%3CString%3E readPartitions = new HashSet%3C%3E();
 %0A%0A    pu
@@ -607,24 +607,24 @@
  partition;%0A
-
         this
@@ -660,16 +660,640 @@
 %0A    %7D%0A%0A
+    public String getWritePartition() %7B%0A        return writePartition;%0A    %7D%0A%0A    public void setWritePartition(final String writePartition) %7B%0A        this.writePartition = writePartition;%0A    %7D%0A%0A    public String getPartitionKey() %7B%0A        return partitionKey;%0A    %7D%0A%0A    public Set%3CString%3E getReadPartitions() %7B%0A        return Collections.unmodifiableSet(readPartitions);%0A    %7D%0A%0A    public void removeReadPartition(final String readPartition) %7B%0A        this.readPartitions.remove(readPartition);%0A    %7D%0A%0A    public void addReadPartition(final String readPartition) %7B%0A        this.readPartitions.add(readPartition);%0A    %7D%0A%0A
     @Ove

Add accessors for PartitionGraph settings.