public OperationFuture < LoadBalancer > create ( LoadBalancerConfig config ) { String dataCenterId = dataCenterService . findByRef ( config . getDataCenter ( ) ) . getId ( ) ; LoadBalancerMetadata loadBalancer = loadBalancerClient . create ( dataCenterId , new LoadBalancerRequest ( ) . name ( config . getName ( ) ) . description ( config . getDescription ( ) ) . status ( config . getStatus ( ) ) ) ; LoadBalancer loadBalancerRef = LoadBalancer . refById ( loadBalancer . getId ( ) , DataCenter . refById ( dataCenterId ) ) ; return new OperationFuture <> ( loadBalancerRef , new SequentialJobsFuture ( ( ) -> new CreateLoadBalancerJobFuture ( this , loadBalancerRef ) , ( ) -> addLoadBalancerPools ( config , loadBalancerRef ) ) ) ; }
Create load balancer