Example #1
0
 public float[] getItemVector(String item) {
   Lock lock = yLock.readLock();
   lock.lock();
   try {
     return Y.get(item);
   } finally {
     lock.unlock();
   }
 }
Example #2
0
 public float[] getUserVector(String user) {
   Lock lock = xLock.readLock();
   lock.lock();
   try {
     return X.get(user);
   } finally {
     lock.unlock();
   }
 }