Examples of ReentrantReadWriteLock


Examples of java.util.concurrent.locks.ReentrantReadWriteLock

        try
        {
            if( rwLock == null )
            {
                // Create a ReadWrite lock from scratch
                rwLock = new ReentrantReadWriteLock();
            }

            // load the last stored valid CSN value
            String contextEntryId = getEntryId( getSuffixDn() );
           
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

        }
       
        if( rwLock == null )
        {
            // Create a ReadWrite lock from scratch
            rwLock = new ReentrantReadWriteLock();
        }
       
        try
        {
            String contextEntryId = getEntryId( getSuffixDn() );
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

        if (root == this) {
            // Adding a new root cell to the universe
            if (!isRoot) {
                // Fisrt time, so setup internal root cell structures
                readWriteLock = new ReentrantReadWriteLock(true);
                this.viewCacheSet = new ViewCacheSet();
                isRoot = true;
                spaces = new HashSet();
            }
               
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    this.stdDevWeighted = stdDevWeighted == Weighting.WEIGHTED;
    this.compactAverages = compactAverages;
    this.maxEntries = maxEntries;
    this.averageDiffs = new FastByIDMap<FastByIDMap<RunningAverage>>();
    this.averageItemPref = new FastByIDMap<RunningAverage>();
    this.buildAverageDiffsLock = new ReentrantReadWriteLock();
    this.allRecommendableItemIDs = new FastIDSet(dataModel.getNumItems());
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  public ItemUserAverageRecommender(DataModel dataModel) {
    super(dataModel);
    this.itemAverages = new FastByIDMap<RunningAverage>();
    this.userAverages = new FastByIDMap<RunningAverage>();
    this.overallAveragePrefValue = new FullRunningAverage();
    this.buildAveragesLock = new ReentrantReadWriteLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  private final RefreshHelper refreshHelper;
 
  public ItemAverageRecommender(DataModel dataModel) {
    super(dataModel);
    this.itemAverages = new FastByIDMap<RunningAverage>();
    this.buildAveragesLock = new ReentrantReadWriteLock();
    this.refreshHelper = new RefreshHelper(new Callable<Object>() {
      @Override
      public Object call() throws TasteException {
        buildAverageDiffs();
        return null;
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

    this.dataFile = dataFile.getAbsoluteFile();
    this.lastModified = dataFile.lastModified();
    this.maxEntries = maxEntries;
    this.averageDiffs = new FastByIDMap<FastByIDMap<RunningAverage>>();
    this.allRecommendableItemIDs = new FastIDSet();
    this.buildAverageDiffsLock = new ReentrantReadWriteLock();
  }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  final ReadWriteLock                    _lock;
  final ConcurrentHashMap<String, ZNode> _cache;

  public Cache()
  {
    _lock = new ReentrantReadWriteLock();
    _cache = new ConcurrentHashMap<String, ZNode>();
  }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

        if (lifecycleManagerRegistry == null) {
            throw new NullPointerException("lifecycleManagerRegistry");
        }
        this.lifecycleManagerRegistry = lifecycleManagerRegistry;
        this.cacheByClass = new HashMap<Class<?>, ResourceRecord>();
        ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
        readersLock = readWriteLock.readLock();
        writersLock = readWriteLock.writeLock();
    }
View Full Code Here

Examples of java.util.concurrent.locks.ReentrantReadWriteLock

  @Inject
  public HostImpl(@Assisted HostEntity hostEntity,
      @Assisted boolean persisted, Injector injector) {
    this.stateMachine = stateMachineFactory.make(this);
    rwLock = new ReentrantReadWriteLock();
    this.readLock = rwLock.readLock();
    this.writeLock = rwLock.writeLock();

    this.hostEntity = hostEntity;
    this.persisted = persisted;
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.