Client library for Affinity in java