making ArrayLists in PartitionContext synchronised