public double calculateReplicaUsableCapacity(int vmthinsizeparentvm,int poolsnapshotcount,int desktoppoolcount,int datastorecount,int storageoverhead,String storagetiering){
  boolean b=false;
  if (storagetiering.equalsIgnoreCase("On")) {
    b=true;
  }
 else {
    b=false;
  }
  double d=0;
  if (b) {
    d=(vmthinsizeparentvm * desktoppoolcount * poolsnapshotcount) / 1048576.0;
  }
 else {
    d=(vmthinsizeparentvm * poolsnapshotcount * desktoppoolcount* datastorecount) / 1048576.0;
  }
  d*=(1.0 + (storageoverhead / 100.0));
  d=(double)Math.round(d * 100) / 100;
  return d;
}

public double calculateReplicaUsableCapacity ( int vmthinsizeparentvm , int poolsnapshotcount , int desktoppoolcount , int datastorecount , int storageoverhead , String storagetiering ) { boolean b = false ; if ( storagetiering . equalsIgnoreCase ( "On" ) ) { b = true ; } else { b = false ; } double d = 0 ; if ( b ) { d = ( vmthinsizeparentvm * desktoppoolcount * poolsnapshotcount ) / 1048576.0 ; } else { d = ( vmthinsizeparentvm * poolsnapshotcount * desktoppoolcount * datastorecount ) / 1048576.0 ; } d *= ( 1.0 + ( storageoverhead / 100.0 ) ) ; d = ( double ) Math . round ( d * 100 ) / 100 ; return d ; }
calculate amount of storage capacity to be used by replicas
