com.tibco.tea.agent.api

## Interface TeaPersistence

-     public interface TeaPersistence

  Interface that defines the sharing operations for the Tea Persistence

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.json.JSONObject` | `getObject(String agentTypeName, String objectTypeName, String key)` Retrieves the Shared Tea Object for the given arguments
    `Map<String,org.json.JSONObject>` | `getObjectClosure(String agentTypeName, String objectTypeName, String key)` Retrieves the Shared Tea Object for the given arguments and all its references
    `Map<String,org.json.JSONObject>` | `getObjects(String agentTypeName, String objectTypeName)` Retrieves all the Shared Tea Objects for the given arguments
    `void` | `share(SingletonTeaObject teaObject)` Shares the given singleton tea object
    `void` | `share(TeaObject teaObject)` Shares the given tea object
    `void` | `unshare(SingletonTeaObject teaObject)` Unshares the given singleton tea object
    `void` | `unshare(TeaObject teaObject)` Unshares the given tea object

- - ### Method Detail

    - #### share

          void share(TeaObject teaObject)

      Shares the given tea object
      Parameters:
        `teaObject` -

    - #### share

          void share(SingletonTeaObject teaObject)

      Shares the given singleton tea object
      Parameters:
        `teaObject` -

    - #### unshare

          void unshare(TeaObject teaObject)

      Unshares the given tea object
      Parameters:
        `teaObject` -

    - #### unshare

          void unshare(SingletonTeaObject teaObject)

      Unshares the given singleton tea object
      Parameters:
        `teaObject` -

    - #### getObject

          org.json.JSONObject getObject(String agentTypeName,
                                        String objectTypeName,
                                        String key)

      Retrieves the Shared Tea Object for the given arguments
      Parameters:
        `agentTypeName` -
        `objectTypeName` -
        `key` -
      Returns:
        `JSONObject` or null if no shared object is found

    - #### getObjectClosure

          Map<String,org.json.JSONObject> getObjectClosure(String agentTypeName,
                                                           String objectTypeName,
                                                           String key)

      Retrieves the Shared Tea Object for the given arguments and all its references
      Parameters:
        `agentTypeName` -
        `objectTypeName` -
        `key` -
      Returns:
        `JSONObject` or null if no shared object is found

    - #### getObjects

          Map<String,org.json.JSONObject> getObjects(String agentTypeName,
                                                     String objectTypeName)

      Retrieves all the Shared Tea Objects for the given arguments
      Parameters:
        `agentTypeName` -
        `objectTypeName` -
      Returns:

Copyright © 2022 TIBCO Software Inc.. All Rights Reserved.