org.fuchss.objectcasket.objectpacker.impl.SyncedSession Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of object-casket Show documentation
Show all versions of object-casket Show documentation
Object Casket is a simple O/R mapper that can be used together with the Java Persistence API (JPA). The aim is to provide a simple solution for small projects to store multi-related
entities in a simple manner.
package org.fuchss.objectcasket.objectpacker.impl;
import org.fuchss.objectcasket.common.CasketException;
import org.fuchss.objectcasket.objectpacker.port.Session;
import org.fuchss.objectcasket.objectpacker.port.SessionObserver;
import org.fuchss.objectcasket.tablemodule.port.TableModule;
import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.Semaphore;
abstract class SyncedSession extends CoreSession implements Runnable {
private Thread thread;
private final Semaphore needSync = new Semaphore(0); // only for signal
private final Set observers = new HashSet<>();
private final Set
© 2015 - 2024 Weber Informatics LLC | Privacy Policy