Interface SubjectTypeCollection<I>

  • Type Parameters:
    I - subject identifier type

    public interface SubjectTypeCollection<I>
    Collection providing a view of subjects of a given type within the PEX engine.
    Since:
    2.0.0
    • Method Detail

      • type

        SubjectType<Itype()
        Set information configuring resolution for this subject type.
        Returns:
        the active type information
        Since:
        2.0.0
      • cacheAll

        void cacheAll()
        Request that all subjects of this type be loaded into the cache.

        Be aware that on larger collections this may be a very expensive operation.

        Since:
        2.0.0
      • activeSubjects

        Collection<CalculatedSubjectactiveSubjects()
        Get an unmodifiable view of the calculated subjects currently active in this data store.

        This view may update at any time.

        Returns:
        An unmodifiable view of the subjects
        Since:
        2.0.0
      • uncache

        void uncache​(I identifier)
        Request that a given identifier be removed from the cached data stores.
        Parameters:
        identifier - The subject identifier to uncache.
        Since:
        2.0.0
      • get

        CompletableFuture<CalculatedSubjectget​(I identifier)
        Get the calculated subject data for a given subject.

        The returned data allows querying subject data taking into account both persistent and transient data, inheritance, context priorities and inheritance, and any factors that may be implemented in the future.

        Parameters:
        identifier - The identifier of the subject to get
        Returns:
        A future providing the calculated subject
        Throws:
        IllegalArgumentException - if the given identifier is not valid for this subject type
        Since:
        2.0.0
      • transientData

        SubjectDataCache<ItransientData()
        Access the transient data for subjects of this type.

        Operations on these data objects will only be stored in memory. If SubjectType.transientHasPriority() is true, data set here will override the persistent data for subjects in this collection.

        Returns:
        The transient data cache
        Since:
        2.0.0
      • persistentData

        SubjectDataCache<IpersistentData()
        Access the persistent data for subjects of this type
        Returns:
        The persistent data cache
        Since:
        2.0.0
      • load

        void load​(I identifier)
        Request that a subject of a given identifier is loaded into the cache. This operation completes asynchronously.
        Parameters:
        identifier - The identifier of the subject being loaded.
        Since:
        2.0.0
      • isRegistered

        CompletableFuture<BooleanisRegistered​(I identifier)
        Query the backing data stores to see if a given subject is registered
        Parameters:
        identifier - The identifier of the subject to query
        Returns:
        A future returning whether or not this subject has data registered
        Since:
        2.0.0
      • allIdentifiers

        Stream<IallIdentifiers()
        Get a set of subject identifiers for every subject registered of this type.
        Returns:
        All subject identifiers
        Since:
        2.0.0