com.espertech.esper.runtime.internal.support.ObjectReservationSingleton Maven / Gradle / Ivy
The newest version!
/*
***************************************************************************************
* Copyright (C) 2006 EsperTech, Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
***************************************************************************************
*/
package com.espertech.esper.runtime.internal.support;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashSet;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* Singleton class for testing out multi-threaded code.
* Allows reservation and de-reservation of any Object. Reserved objects are added to a HashSet and
* removed from the HashSet upon de-reservation.
*/
public class ObjectReservationSingleton {
private HashSet
© 2015 - 2025 Weber Informatics LLC | Privacy Policy