Interface Repository

All Known Subinterfaces:
Provider
All Known Implementing Classes:
BasicProvider, BufferedCache, CimClient, InMemoryCache, InMemoryRepository, PersistentCache

public interface Repository
Interface implemented by all repository classes
Author:
Sharad Singhal
  • Method Details

    • put

      boolean put(NamedElement element)
      Put a named element into the repository
      Parameters:
      element - - element to be added
      Returns:
      - true if successfully added, false otherwise
    • get

      Get a named element from the repository
      Parameters:
      path - - object path corresponding to the named element
      Returns:
      - Named Element corresponding to the element. Null returned if no such element exists in the repository
    • contains

      boolean contains(ObjectPath path)
      Check if a named element exists in the repository
      Parameters:
      path - - object path corresponding to the named element
      Returns:
      - true if the path exists in the repository, false otherwise
    • delete

      boolean delete(ObjectPath path)
      Delete a named element from the repository
      Parameters:
      path - - object path corresponding to the named element
      Returns:
      - true if deletion succeeded, false otherwise
    • getNameSpaces

      List<NameSpacePath> getNameSpaces()
      Get a list of all name spaces known to this repository. Note that because implementations can add or remove name spaces as elements are added or deleted, this list may not be complete, and depends on the repository implementation
      Returns:
      - list of name spaces
    • getElements

      List<NamedElement> getElements(String elementTypes, String localNameSpaces, String elementNames, boolean locateSubTypes)
      Get elements from this repository. Depending on the size of the repository, this method can be very expensive in time and/or memory
      Parameters:
      elementTypes - - Optional comma separated list of element types to retrieve. Must be a NamedElement type (QualifierType, Enumeration, Interface, Structure, Class, StructureValue or Instance). A null will retrieve all types. Note that standard qualifier types are "built in" and are not returned by this method.
      localNameSpaces - - Optional comma separated list of local name spaces to search. A null will retrieve elements from all name spaces
      elementNames - - Optional comma-separated list of element names to retrieve. A null will retrieve all elements of the given type. For instances, all instances corresponding to the class name are returned
      locateSubTypes - - if true, locate all subtypes of the given element types (e.g., all subclasses of the requested class).
      Returns:
      - list of elements that match the given criteria. An empty list is returned if no matching elements are found
      See Also:
    • filter

      List<StructureValue> filter(ObjectPath structPath, CimFilter filter)
      Find all structure value instances based on some filter criteria
      Parameters:
      structPath - - object path to the structure to use
      filter - - filter to apply
      Returns:
      - list of structureValues that pass the given filter. Empty list if none available
    • shutdown

      void shutdown()
      Shut down the repository. This method MUST be called before exiting to cleanly finish all pending tasks and release resources in the repository