@Override
    public void barrierConsumer(final TraverserSet<S> traverserSet) {
        if (null == this.multiComparator) this.multiComparator = this.createMultiComparator();
        //
        if (this.multiComparator.isShuffle())
            traverserSet.shuffle(random);
        else
            traverserSet.sort((Comparator) this.multiComparator);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/OrderGlobalStep.java