/** * Tries to increment the refCount of this Store instance. This method will return {@code true} iff the refCount was * incremented successfully otherwise {@code false}. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. * <p> * Note: Close can safely be called multiple times. * * @see #decRef() * @see #incRef() */ @Override public final boolean tryIncRef() { return refCounter.tryIncRef(); }
@Override public final void incRef() { if (tryIncRef() == false) { alreadyClosed(); } }
/** * Tries to increment the refCount of this Store instance. This method will return <tt>true</tt> iff the refCount was * incremented successfully otherwise <tt>false</tt>. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. * <p> * Note: Close can safely be called multiple times. * * @see #decRef() * @see #incRef() */ @Override public final boolean tryIncRef() { return refCounter.tryIncRef(); }
/** * Tries to increment the refCount of this Store instance. This method will return <tt>true</tt> iff the refCount was * incremented successfully otherwise <tt>false</tt>. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. * <p> * Note: Close can safely be called multiple times. * * @see #decRef() * @see #incRef() */ @Override public final boolean tryIncRef() { return refCounter.tryIncRef(); }
/** * Tries to increment the refCount of this Store instance. This method will return {@code true} iff the refCount was * incremented successfully otherwise {@code false}. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. * <p> * Note: Close can safely be called multiple times. * * @see #decRef() * @see #incRef() */ @Override public final boolean tryIncRef() { return refCounter.tryIncRef(); }
/** * Tries to increment the refCount of this Store instance. This method will return {@code true} iff the refCount was * incremented successfully otherwise {@code false}. RefCounts are used to determine when a * Store can be closed safely, i.e. as soon as there are no more references. Be sure to always call a * corresponding {@link #decRef}, in a finally clause; otherwise the store may never be closed. Note that * {@link #close} simply calls decRef(), which means that the Store will not really be closed until {@link * #decRef} has been called for all outstanding references. * <p> * Note: Close can safely be called multiple times. * * @see #decRef() * @see #incRef() */ @Override public final boolean tryIncRef() { return refCounter.tryIncRef(); }
@Override public final void incRef() { if (tryIncRef() == false) { alreadyClosed(); } }
@Override public final void incRef() { if (tryIncRef() == false) { alreadyClosed(); } }
@Override public final void incRef() { if (tryIncRef() == false) { alreadyClosed(); } }
@Override public final void incRef() { if (tryIncRef() == false) { alreadyClosed(); } }