public int getDataCenterWriteQuorum ( final String dataCenter ) { final ODocument dc = getDataCenterConfiguration ( dataCenter ) ; Object wq = dc . field ( WRITE_QUORUM ) ; if ( wq instanceof String ) { if ( wq . toString ( ) . equalsIgnoreCase ( ODistributedConfiguration . QUORUM_MAJORITY ) ) { final List < String > servers = dc . field ( SERVERS ) ; wq = servers . size ( ) / 2 + 1 ; } else if ( wq . toString ( ) . equalsIgnoreCase ( ODistributedConfiguration . QUORUM_ALL ) ) { final List < String > servers = dc . field ( SERVERS ) ; wq = servers . size ( ) ; } } return ( Integer ) wq ; }
Returns the data center write quorum .