/* (non-Javadoc)
@see tuwien.auto.calimero.buffer.cache.Cache#get(java.lang.Object)
514000
public synchronized CacheObject get(Object key)
	{
		final CacheObject o = (CacheObject) map.get(key);
		if (o != null) {
			tree.remove(o);
			updateAccess(o);
			tree.put(o, o);
			++hits;
		}
		else
			++misses;
		return o;
	}
1175450
@Override
    @SuppressWarnings("unchecked")
    public V get(Object key) {
        final Element element = this.cache.get((Serializable) key);
        if (element == null) {
            return null;
        }

        return (V) element.getObjectValue();
    }
1098207
@Override
	public Promise get(String key) {
		try {
			int pos = partitionPosition(key, true);

			// Prefix is the name of the partition / region (eg.
			// "user" from the "user.name" cache key)
			String prefix = key.substring(0, pos);
			javax.cache.Cache<String, byte[]> partition = getPartition(prefix);
			if (partition != null) {
				byte[] bytes = partition.get(key.substring(pos + 1));
				if (bytes != null) {
					Tree root = serializer.read(bytes);
					Tree content = root.get(CONTENT);
					if (content != null) {
						return Promise.resolve(content);
					}
					return Promise.resolve(root);
				}
			}
		} catch (Throwable cause) {
			logger.warn("Unable to get data from JCache!", cause);
		}
		return Promise.resolve((Object) null);
	}
1128841
@Override
  public Object get(String attributeName) {
    if (cachedValueMap == null) {
      cachedValueMap = new LinkedHashMap<>();
    }

    Object value;
    if (cachedValueMap.containsKey(attributeName)) {
      value = cachedValueMap.get(attributeName);
    } else {
      Integer col = colNamesMap.get(attributeName);
      if (col != null) {
        Cell cell = row.getCell(col);
        if (cell != null) {
          value = ExcelUtils.toValue(cell, cellProcessors);
        } else {
          value = null;
        }
      } else {
        value = null;
      }

      cachedValueMap.put(attributeName, value);
    }
    return value;
  }
1098780
@Override
    public synchronized Object getValue() {
        if (id != null) {
            if (serializedValue != null) {
                long oldSize = -1;
                if (cacheEntryPool != null) {
                    if (cacheEntryPool.cache.isCacheSizeInMBEnabled()) {
                        oldSize = getObjectSize();
                    }
                }

                try {
                    value = SerializationUtility.deserialize(serializedValue, cacheName);
                } catch (Exception ex) {
                    com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ws.cache.CacheEntry.getValue", "200", this);
                }
                if (value != null) {
                    serializedValue = null;
                    if (cacheEntryPool != null) {
                        if (cacheEntryPool.cache.isCacheSizeInMBEnabled()) {
                            long newSize = getObjectSize();
                            if (oldSize != -1 && newSize != -1) {
                                cacheEntryPool.cache.increaseCacheSizeInBytes(newSize - oldSize, "GET_VALUE");
                            } else {
                                cacheEntryPool.cache.disableCacheSizeInMB();
                            }
                        }
                    }
                }
            }
        }
        return value;
    }
375137
@Override
  public V get(K k) throws ExecutionException {
    V value = getIfPresent(k);
    if (null == value) {
      try {
        value = cacheLoader.load(k);
        if (null != value) {
          put(k, value);
        }
      } catch (Exception e) {
        LOGGER.warn("Failed to load value for the cache {}", e);
      }
    }
    //LOGGER.debug("get {} = {}", k, value);
    return value;
  }
1197696
public T get(String key) {

        Object ramResult = null;
        String diskResult = null;
        DiskLruCache.Snapshot snapshotObject = null;

        // Try to get the object from RAM.
        boolean isRamSerialized = ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER);
        boolean isRamReferenced = ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE);
        if (isRamSerialized || isRamReferenced) {
            ramResult = ramCacheLru.get(key);
        }

        if (ramResult == null) {
            // Try to get the cached object from disk.
            loggerHelper.logEntryForKeyIsNotInRam(key);
            if (diskMode.equals(DualCacheDiskMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                try {
                    dualCacheLock.lockDiskEntryWrite(key);
                    snapshotObject = diskLruCache.get(key);
                } catch (IOException e) {
                    logger.logError(e);
                } finally {
                    dualCacheLock.unLockDiskEntryWrite(key);
                }

                if (snapshotObject != null) {
                    loggerHelper.logEntryForKeyIsOnDisk(key);
                    try {
                        diskResult = snapshotObject.getString(0);
                    } catch (IOException e) {
                        logger.logError(e);
                    }
                } else {
                    loggerHelper.logEntryForKeyIsNotOnDisk(key);
                }
            }

            T objectFromStringDisk = null;

            if (diskResult != null) {
                // Load object, no need to check disk configuration since diskresult != null.
                objectFromStringDisk = diskSerializer.fromString(diskResult);

                // Refresh object in ram.
                if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE)) {
                    if (diskMode.equals(DualCacheDiskMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                        ramCacheLru.put(key, objectFromStringDisk);
                    }
                } else if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                    if (diskSerializer == ramSerializer) {
                        ramCacheLru.put(key, diskResult);
                    } else {
                        ramCacheLru.put(key, ramSerializer.toString(objectFromStringDisk));
                    }
                }
                return objectFromStringDisk;
            }
        } else {
            loggerHelper.logEntryForKeyIsInRam(key);
            if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE)) {
                return (T) ramResult;
            } else if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
                return ramSerializer.fromString((String) ramResult);
            }
        }

        // No data is available.
        return null;
    }
415624
@Override
    public synchronized Object get(final Object key) {
        final Object value = remove(key);
        if (value != null) put(key, value);
        return value;
    }
1352161
public V get(K k) throws InterruptedException {
        await(k);
        return cache.get(k);
    }
1172189
@SuppressWarnings("unchecked")
  @Override
  public <T> T get(final Object key, final Callable<T> valueLoader) {
    try {
      return (T) cache.computeIfAbsent(key, (Callable<Object>) valueLoader);
    } catch (RuntimeException ex) {
      throw new ValueRetrievalException(key, valueLoader, ex);
    }
  }
717326
@Override
  public LookupExtractor get()
  {
    final Lock readLock = startStopSync.readLock();
    try {
      readLock.lockInterruptibly();
    }
    catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
    try {
      if (entry == null) {
        throw new ISE("Factory [%s] not started", extractorID);
      }
      final CacheScheduler.CacheState cacheState = entry.getCacheState();
      if (cacheState instanceof CacheScheduler.NoCache) {
        final String noCacheReason = ((CacheScheduler.NoCache) cacheState).name();
        throw new ISE("%s: %s, extractorID = %s", entry, noCacheReason, extractorID);
      }
      CacheScheduler.VersionedCache versionedCache = (CacheScheduler.VersionedCache) cacheState;
      Map<String, String> map = versionedCache.getCache();
      final byte[] v = StringUtils.toUtf8(versionedCache.getVersion());
      final byte[] id = StringUtils.toUtf8(extractorID);
      return new MapLookupExtractor(map, isInjective())
      {
        @Override
        public byte[] getCacheKey()
        {
          return ByteBuffer
              .allocate(CLASS_CACHE_KEY.length + id.length + 1 + v.length + 1 + 1)
              .put(CLASS_CACHE_KEY)
              .put(id).put((byte) 0xFF)
              .put(v).put((byte) 0xFF)
              .put(isOneToOne() ? (byte) 1 : (byte) 0)
              .array();
        }
      };
    }
    finally {
      readLock.unlock();
    }
  }
66385
public final SgClass get(final String className) {
        if (className == null) {
            throw new IllegalArgumentException("The argument 'className' cannot be null!");
        }
        return cache.get(className);
    }
436069
private static synchronized Object getFromCache(Cache cache,
            byte[] encoding) {
        Object key = new Cache.EqualByteArray(encoding);
        Object value = cache.get(key);
        return value;
    }
376444
protected Object getFromCache(String cacheName, String key) {
        try {
            ICache cache = getCache(cacheName);
            return cache != null ? cache.get(key) : null;
        } catch (CacheException e) {
            LOGGER.warn(e.getMessage(), e);
            return null;
        }
    }
553772
@Override
	public T get() {
		T result = object;
		if (result == null) {
			synchronized (this) {
				result = object;
				if (result == null) {
					object = result = init();
				}
			}
		}
		return result;
	}
824150
@Override
	public Object get(java.lang.Object key) {
		return internalMap.get(key);
	}
1009985
@Override
    public Object get() throws InterruptedException, ExecutionException {
        ScheduledFuture<?> curr;
        synchronized (this.triggerContextMonitor) {
            curr = this.currentFuture;
        }
        return curr.get();
    }