Package net.ontopia.infoset.content
Interface ContentStoreIF
-
- All Known Implementing Classes:
FileContentStore,InMemoryContentStore,JDBCContentStore,JDBCSequenceContentStore
public interface ContentStoreIFINTERNAL: A simple content store interface that stores chunks of data associated with an integer key. The underlying implementation is responsible for creating the keys.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intadd(InputStream data, int length)INTERNAL: Creates an entry for the specified data value.intadd(ContentInputStream data)INTERNAL: Creates an entry for the specified data value.voidclose()INTERNAL: Closes the content store.booleancontainsKey(int key)INTERNAL: Returns true if the content store contains an entry with the specified key.ContentInputStreamget(int key)INTERNAL: Gets the data value associated with the specified key.booleanremove(int key)INTERNAL: Removes the entry associated with the key.
-
-
-
Method Detail
-
containsKey
boolean containsKey(int key) throws ContentStoreExceptionINTERNAL: Returns true if the content store contains an entry with the specified key.- Throws:
ContentStoreException
-
get
ContentInputStream get(int key) throws ContentStoreException
INTERNAL: Gets the data value associated with the specified key.- Throws:
ContentStoreException
-
add
int add(ContentInputStream data) throws ContentStoreException
INTERNAL: Creates an entry for the specified data value.- Throws:
ContentStoreException
-
add
int add(InputStream data, int length) throws ContentStoreException
INTERNAL: Creates an entry for the specified data value.- Throws:
ContentStoreException
-
remove
boolean remove(int key) throws ContentStoreExceptionINTERNAL: Removes the entry associated with the key. If the key is not present the call has no effect.- Returns:
- true if the key was present; false otherwise
- Throws:
ContentStoreException
-
close
void close() throws ContentStoreExceptionINTERNAL: Closes the content store. This allows all internal resources to be released.- Throws:
ContentStoreException
-
-