Class ObjectStoreAccessor<T extends Serializable>

java.lang.Object
com.mulesoft.connectors.a2a.internal.util.ObjectStoreAccessor<T>

public class ObjectStoreAccessor<T extends Serializable> extends Object
  • Constructor Details

    • ObjectStoreAccessor

      public ObjectStoreAccessor(org.mule.runtime.api.store.ObjectStore<T> objectStore, org.mule.runtime.api.lock.LockFactory lockFactory, Function<String,String> lockKeyFunction)
  • Method Details

    • upsert

      public void upsert(String id, T item) throws org.mule.runtime.api.store.ObjectStoreException
      Throws:
      org.mule.runtime.api.store.ObjectStoreException
    • get

      public Optional<T> get(String id) throws org.mule.runtime.api.exception.ObjectNotFoundException, org.mule.runtime.api.store.ObjectStoreException
      Throws:
      org.mule.runtime.api.exception.ObjectNotFoundException
      org.mule.runtime.api.store.ObjectStoreException
    • remove

      public void remove(String id) throws org.mule.runtime.api.store.ObjectStoreException
      Throws:
      org.mule.runtime.api.store.ObjectStoreException
    • close

      public void close() throws org.mule.runtime.api.store.ObjectStoreException
      Throws:
      org.mule.runtime.api.store.ObjectStoreException