private void checkFenced() throws ManagedLedgerException {
  if (state.get() == State.Fenced) {
    log.error("[{}] Attempted to use a fenced managed ledger",name);
    throw new ManagedLedgerFencedException();
  }
}

private void checkFenced ( ) throws ManagedLedgerException { if ( state . get ( ) == State . Fenced ) { log . error ( "[{}] Attempted to use a fenced managed ledger" , name ) ; throw new ManagedLedgerFencedException ( ) ; } }
throws an exception if the managed ledger has been previously fenced
