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

io.infinicast.client.impl.objectState.ObjectStateManager Maven / Gradle / Ivy

There is a newer version: 3.0.10
Show newest version
package io.infinicast.client.impl.objectState;

import io.infinicast.client.api.IPath;
import io.infinicast.client.impl.IConnector;

import java.util.HashMap;
public class ObjectStateManager {
    IConnector _connector;
    HashMap _localObjects = new HashMap();
    public ObjectStateManager(IConnector apServiceStormConnector) {
        this._connector = apServiceStormConnector;
    }
    public IPath getOrCreateLocalObject(String path) {
        synchronized (this._localObjects) {
            if (!(this._localObjects.containsKey(path))) {
                IPath obj = this._connector.path(path);
                this._localObjects.put(path, obj);
            }
            return this._localObjects.get(path);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy