public static Arbitrator create ( final Set < String > domains , final String interfaceName , final Version interfaceVersion , final DiscoveryQos discoveryQos , DiscoveryAsync localDiscoveryAggregator ) throws DiscoveryException { ArbitrationStrategyFunction arbitrationStrategyFunction ; switch ( discoveryQos . getArbitrationStrategy ( ) ) { case FixedChannel : arbitrationStrategyFunction = new FixedParticipantArbitrationStrategyFunction ( ) ; break ; case Keyword : arbitrationStrategyFunction = new KeywordArbitrationStrategyFunction ( ) ; break ; case HighestPriority : arbitrationStrategyFunction = new HighestPriorityArbitrationStrategyFunction ( ) ; break ; case LastSeen : arbitrationStrategyFunction = new LastSeenArbitrationStrategyFunction ( ) ; break ; case Custom : arbitrationStrategyFunction = discoveryQos . getArbitrationStrategyFunction ( ) ; break ; default : throw new DiscoveryException ( "Arbitration failed: domain: " + domains + " interface: " + interfaceName + " qos: " + discoveryQos + ": unknown arbitration strategy or strategy not set!" ) ; } return new Arbitrator ( domains , interfaceName , interfaceVersion , discoveryQos , localDiscoveryAggregator , minimumArbitrationRetryDelay , arbitrationStrategyFunction , discoveryEntryVersionFilter ) ; }
Creates an arbitrator defined by the arbitrationStrategy set in the discoveryQos .