All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.contentful.java.cda.Cache Maven / Gradle / Ivy

There is a newer version: 9.1.0
Show newest version
package com.contentful.java.cda;

import java.util.Map;

final class Cache {
  private CDASpace space;

  private Map types;

  private final Object LOCK_SPACE = new Object();

  private final Object LOCK_TYPES = new Object();

  CDASpace space() {
    synchronized (LOCK_SPACE) {
      return space;
    }
  }

  void setSpace(CDASpace space) {
    synchronized (LOCK_SPACE) {
      this.space = space;
    }
  }

  Map types() {
    synchronized (LOCK_TYPES) {
      return types;
    }
  }

  void setTypes(Map types) {
    synchronized (LOCK_TYPES) {
      this.types = types;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy