/** {@inheritDoc} * * <p><b>Warning:</b> Lucene never closes cloned * {@code IndexInput}s, it will only call {@link #close()} on the original object. * * <p>If you access the cloned IndexInput after closing the original object, * any <code>readXXX</code> methods will throw {@link AlreadyClosedException}. * * <p>This method is NOT thread safe, so if the current {@code IndexInput} * is being used by one thread while {@code clone} is called by another, * disaster could strike. */ @Override public IndexInput clone() { return (IndexInput) super.clone(); }
@Override public Object clone() { HdfsFileReader reader = (HdfsFileReader) super.clone(); reader.isClone = true; return reader; }
/** {@inheritDoc} * * <p><b>Warning:</b> Lucene never closes cloned * {@code IndexInput}s, it will only call {@link #close()} on the original object. * * <p>If you access the cloned IndexInput after closing the original object, * any <code>readXXX</code> methods will throw {@link AlreadyClosedException}. * * <p>This method is NOT thread safe, so if the current {@code IndexInput} * is being used by one thread while {@code clone} is called by another, * disaster could strike. */ @Override public IndexInput clone() { return (IndexInput) super.clone(); }
/** {@inheritDoc} * * <p><b>Warning:</b> Lucene never closes cloned * {@code IndexInput}s, it will only call {@link #close()} on the original object. * * <p>If you access the cloned IndexInput after closing the original object, * any <code>readXXX</code> methods will throw {@link AlreadyClosedException}. * * <p>This method is NOT thread safe, so if the current {@code IndexInput} * is being used by one thread while {@code clone} is called by another, * disaster could strike. */ @Override public IndexInput clone() { return (IndexInput) super.clone(); }
/** {@inheritDoc} * * <p><b>Warning:</b> Lucene never closes cloned * {@code IndexInput}s, it will only call {@link #close()} on the original object. * * <p>If you access the cloned IndexInput after closing the original object, * any <code>readXXX</code> methods will throw {@link AlreadyClosedException}. * * <p>This method is NOT thread safe, so if the current {@code IndexInput} * is being used by one thread while {@code clone} is called by another, * disaster could strike. */ @Override public IndexInput clone() { return (IndexInput) super.clone(); }