Package net.aifusion.metamodel
Class BufferedCache
java.lang.Object
net.aifusion.metamodel.InMemoryCache
net.aifusion.metamodel.BufferedCache
- All Implemented Interfaces:
Repository
Deprecated, for removal: This API element is subject to removal in a future version.
Class to implement a simple in-memory buffer backed by a repository for parsing messages. The buffer uses a
backing store to resolve any classes not contained in it. However, any objects added to (or deleted from)
the buffer do not affect the objects in the backing store. The buffer does not provide any persistence.
- Author:
- Sharad Singhal
-
Constructor Summary
ConstructorDescriptionBufferedCache
(Repository backingStore) Deprecated, for removal: This API element is subject to removal in a future version.Create a repository buffer with a backing store for additional definitions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(ObjectPath path) Deprecated, for removal: This API element is subject to removal in a future version.Check if an element exists in the buffer.get
(ObjectPath path) Deprecated, for removal: This API element is subject to removal in a future version.Get a named element from the buffer.getAllElements
(String elementTypes, String localNameSpaces, String elementNames, boolean locateSubtypes) Deprecated, for removal: This API element is subject to removal in a future version.Get all elements from the buffer (as well as from the backing store)Deprecated, for removal: This API element is subject to removal in a future version.Get the backing store for this repositorygetBufferedElement
(ObjectPath path) Deprecated, for removal: This API element is subject to removal in a future version.Get a named element from the buffer.Deprecated, for removal: This API element is subject to removal in a future version.Get the named elements from the buffer, but not the backing storeDeprecated, for removal: This API element is subject to removal in a future version.Get the list of name spaces defined in the buffer (or the backing store)Methods inherited from class net.aifusion.metamodel.InMemoryCache
delete, filter, getElements, put, shutdown
-
Constructor Details
-
BufferedCache
Deprecated, for removal: This API element is subject to removal in a future version.Create a repository buffer with a backing store for additional definitions. New definitions are added to the buffer, while the backing store is used for any additional definitions needed for input resolution- Parameters:
backingStore
- - Repository backing this buffer
-
-
Method Details
-
getBackingStore
Deprecated, for removal: This API element is subject to removal in a future version.Get the backing store for this repository- Returns:
- - Repository backing this repository
-
get
Deprecated, for removal: This API element is subject to removal in a future version.Get a named element from the buffer. If the element does not exist in the buffer, it is retrieved from the backing store.- Specified by:
get
in interfaceRepository
- Overrides:
get
in classInMemoryCache
- Parameters:
path
- - object path for the element being requested- Returns:
- - named element from the buffer (or the backing store). Null if none found
- See Also:
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.Check if an element exists in the buffer. If the element does not exist in the buffer, it is checked in the backing store- Specified by:
contains
in interfaceRepository
- Overrides:
contains
in classInMemoryCache
- Parameters:
path
- object path for the element being checked- Returns:
- true if the buffer (or the backing store) contains the element, false otherwise
-
getNameSpaces
Deprecated, for removal: This API element is subject to removal in a future version.Get the list of name spaces defined in the buffer (or the backing store)- Specified by:
getNameSpaces
in interfaceRepository
- Overrides:
getNameSpaces
in classInMemoryCache
- Returns:
- list of all name spaces
-
getBufferedElement
Deprecated, for removal: This API element is subject to removal in a future version.Get a named element from the buffer. Only the buffer is checked for the element during retrieval- Parameters:
path
- - objectPath for the element being requested- Returns:
- - named element from the buffered values
- See Also:
-
getBufferedElements
Deprecated, for removal: This API element is subject to removal in a future version.Get the named elements from the buffer, but not the backing store- Returns:
- - list of all elements from this repository
-
getAllElements
public List<NamedElement> getAllElements(String elementTypes, String localNameSpaces, String elementNames, boolean locateSubtypes) Deprecated, for removal: This API element is subject to removal in a future version.Get all elements from the buffer (as well as from the backing store)- Parameters:
elementTypes
- - comma separated list of element types to search. Null implies all typeslocalNameSpaces
- - comma separated list of local name spaces to search. Null implies all name spaceselementNames
- - comma separated list of element names to retrieve. Null matches all element nameslocateSubtypes
- - true if subclasses should be collected, false if only the named elements are required- Returns:
- - list of retrieved elements. Empty if no elements found
-