The shared value must be started before it can be used. Call {@link #close()} when you are
finished with the shared value

@throws Exception ZK errors, interruptions, etc.
193662
public void start() throws Exception
    {
        Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Cannot be started more than once");

        client.getConnectionStateListenable().addListener(connectionStateListener);
        try
        {
            client.create().creatingParentContainersIfNeeded().forPath(path, seedValue);
        }
        catch ( KeeperException.NodeExistsException ignore )
        {
            // ignore
        }

        readValue();
    }
864247
@Override
	public void close() throws IOException {

		// enforce sequential close() calls
		synchronized (CLOSE_MUTEX) {
			this.recordWriter.close(new HadoopDummyReporter());

			if (this.outputCommitter.needsTaskCommit(this.context)) {
				this.outputCommitter.commitTask(this.context);
			}
		}
	}
195340
public void close() throws IOException {
        if (!_closed) {
            try {
                flush();
            } catch (Throwable t) {
                LOG.debug(t.getMessage(), t);
            }
            _closed = true;
            super.close();
        }
    }
1095235
@Override
    public void close() throws IOException {
        if (!closed) {
            closed = true;
            nodeCursor = null;
            _currToken = null;
        }
    }
120024
public synchronized void onClose() {
        if (state == State.DISABLED || state == State.DISABLING)
            throw new IllegalStateException("Do not call onClose if not opened before");
        if (state == State.WAITING) {
            state = State.DISABLED;
        } else {
            state = State.DISABLING;
        }
    }
332513
@Override
	public void close() {
		try {
			xmlSerializer.close();
		} catch (Exception e) {
			e.printStackTrace();
			throw new KriptonRuntimeException(e);
		}

	}
50062
public synchronized void close()
	{
		if (s != null) {
			super.close();
			try {
				s.close();
			}
			catch (final IOException e) {}
			s = null;
		}
	}
1292150
@Override
	public void close() throws Exception {
		Throwable exception = null;

		try {
			blobStoreService.close();
		} catch (Throwable t) {
			exception = t;
		}

		internalClose();

		if (exception != null) {
			ExceptionUtils.rethrowException(exception, "Could not properly close the ZooKeeperHaServices.");
		}
	}
1091357
public void close() throws IOException {   
    if (closed) {
      checkWriteThread();
      return;
    }
    try {
      buffer.close(); 
      // writeThread should exit after this
      // and close underlying stream
      try {
        writeThread.join();
      } catch (InterruptedException e) {
        throw new IOException(e);
      }
    } finally {
      checkWriteThread();
    }
  }
89049
@Override
  public final void close() {
    try {
      doClose();
      isClosed = true;
    } catch (Exception e) {
      Throwables.propagate(e);
    }
  }
757767
public void close() throws IOException {

		//PrintWriter.close does not throw exceptions. Thus, the call does not need
		//be inside a try-catch block.
		if (this.printWriter != null) {
			this.printWriter.close();
		}

		if (this.gzipOutputStream != null) {
			this.gzipOutputStream.close();
		}
	}
149113
protected void close() throws IOException {
        synchronized(fdLock) {
            if (fd != null && fd.valid()) {
                if (!stream) {
                    ResourceManager.afterUdpClose();
                }
                if (closePending) {
                  return;
                }
                closePending = true;
                socketClose();
                return;
            }
        }
    }
864301
@Override
    public void close() throws Exception {
        unbindAll();
        initialContext.destroySubcontext("java:/comp/env/jdbc");
        initialContext.destroySubcontext("java:/comp/env");
        initialContext.destroySubcontext("java:/comp");
        initialContext.destroySubcontext("java:");
        initialContext.close();
    }
785830
@Override
    public void close() throws IOException
    {
        if (!_closed) {
            _closed = true;
            _nodeCursor = null;
            _currToken = null;
        }
    }
84410
@Override
	public synchronized void close() throws IOException {
		// cancel synchronization
		try {
			if (syncTask != null) {
				syncTask.cancel();
			}
			sync();
			unmapFile();
		} finally {
			super.close();
		}
	}
803104
public void close() {
        lock.lock();
        try {
            if (writeTarget == null) {
                closePending = true;
                return;
            }
        } finally {
            lock.unlock();
        }
        writeTarget.closeConnection();
    }
1324653
public void onClose() {
    try {
      this.evaluatorShimCommandChannel.close();
    } catch (Exception e) {
      LOG.log(Level.WARNING, "An unexpected exception while closing the Evaluator Shim Command channel: {0}", e);
      throw new RuntimeException(e);
    }
  }