Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.Sync.release()


                this.doRemove(key);
                m_sizeInstrument.setValue( doGetSize() );
            }
            finally
            {
                sync.release();
            }
        }
        catch (InterruptedException ignore)
        {
        }
View Full Code Here


            {
                return this.doContainsKey(key);
            }
            finally
            {
                sync.release();
            }
        }
        catch (InterruptedException ignore)
        {
            return false;
View Full Code Here

            {
                return this.doGetKeys();
            }
            finally
            {
                sync.release();
            }
        }
        catch (InterruptedException ignore)
        {
            return Collections.enumeration(Collections.EMPTY_LIST);
View Full Code Here

            {
                return this.doGetSize();
            }
            finally
            {
                sync.release();
            }
        }
        catch (InterruptedException ignore)
        {
            return 0;
View Full Code Here

                os.flush();
                os.close();
            } catch (IOException io) {
                this.getLogger().warn("Exception during caching of content to " + file, io);
            } finally {
                sync.release();
            }
        } catch (InterruptedException ie) {
        }
    }
   
View Full Code Here

                return content.getBytes();
            } catch (IOException io) {
                this.getLogger().warn("Exception during reading of content from " + file, io);
                return null;
            } finally {
                sync.release();
            }
        } catch (InterruptedException ie) {
            return null;
        }
    }
View Full Code Here

                } else {
                    signal = new Latch();
                    waitingReaders.add(signal);
                }
            } finally {
                shared.release();
            }

            // if we get here there was an active writer with
            // a dependency to the current id.
            // wait for the writer until it is done, then try again
View Full Code Here

                } else {
                    signal = new Latch();
                    waitingWriters.add(signal);
                }
            } finally {
                exclusive.release();
            }
            // if we get here there is an active writer or there is a read
            // lock that conflicts with the change log
            signal.acquire();
        }
View Full Code Here

                activeWriter = null;
                activeWriterThread = null;
                notifyWaitingReaders();
                notifyWaitingWriters();
            } finally {
                exclusive.release();
            }
        }

        public ReadLock downgrade() {
            readLockMap.addLock(null);
View Full Code Here

                // only notify waiting readers since we still hold a down
                // graded lock, which is kind of exclusiv with respect to
                // other writers
                notifyWaitingReaders();
            } finally {
                exclusive.release();
            }
            return anonymousReadLock;
        }

    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.