public OperationFuture < AntiAffinityPolicy > create ( AntiAffinityPolicyConfig createConfig ) { AntiAffinityPolicyMetadata policy = client . createAntiAffinityPolicy ( new AntiAffinityPolicyRequest ( ) . name ( createConfig . getName ( ) ) . location ( dataCenterService . findByRef ( createConfig . getDataCenter ( ) ) . getId ( ) ) ) ; return new OperationFuture <> ( AntiAffinityPolicy . refById ( policy . getId ( ) ) , new NoWaitingJobFuture ( ) ) ; }
Create Anti - affinity policy