public interface ContentStoreProvider
The ContentStoreProvider
provides access to AIE's content store. Content is stored within namespaces, each identified
by a unique String. Content may be any series of bytes and is identified by a String id unique within the namespace. The result
of simultaneous operations (method calls) that change the state of the content (add, delete, deleteAll) is undefined.
The DEFAULT_NAMESPACE
is optimized for storage of temporary files. Storage of non-ephemeral content should use a
custom namespace.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAMESPACE |
static String |
description |
Modifier and Type | Method and Description |
---|---|
void |
add(String namespace,
String id,
InputStream in)
Content will be copied from the InputStream and stored within the
namespace under the id . |
boolean |
contains(String namespace,
String id) |
void |
delete(String namespace,
String id)
Deletes
id from the namespace . |
void |
deleteAll(String namespace)
Deletes all content from the store within the namespace
|
String |
externalize(String storeName,
String id)
Returns an externally accessible URI for the content suitable for HTTP GET.
|
InputStream |
get(String namespace,
String id)
Returns an InputStream to access the content.
|
long |
getDiskUtilization() |
long |
getLastModified(String namespace,
String id) |
List<String> |
getNamespaces() |
long |
getSize(String namespace,
String id) |
long |
getTotalRecords(String namespace) |
static final String description
static final String DEFAULT_NAMESPACE
boolean contains(String namespace, String id) throws AttivioException
namespace
- the namespace for the contentid
- the id of the contentid
exists within the namespace
AttivioException
void add(String namespace, String id, InputStream in) throws AttivioException
namespace
under the id
. If the content
currently exists, it will be replaced. The stream is not closed.namespace
- the namespace for the contentid
- the id of the contentin
- stream containing the content.AttivioException
void delete(String namespace, String id) throws AttivioException
id
from the namespace
. The content need not be present.namespace
- the namespace for the contentid
- the id of the contentAttivioException
void deleteAll(String namespace) throws AttivioException
namespace
- the namespace to deleteAttivioException
long getTotalRecords(String namespace) throws AttivioException
namespace
- the namespace to queryAttivioException
long getDiskUtilization() throws AttivioException
AttivioException
List<String> getNamespaces() throws AttivioException
AttivioException
InputStream get(String namespace, String id) throws AttivioException
namespace
- the namespace for the contentid
- the id of the contentnull
if it does not existAttivioException
long getSize(String namespace, String id) throws AttivioException
namespace
- the namespace for the contentid
- the id of the contentget(String, String)
should provide.AttivioException
long getLastModified(String namespace, String id) throws AttivioException
namespace
- the namespace for the contentid
- the id of the contentadd(String, String, InputStream)
for the content.AttivioException
String externalize(String storeName, String id) throws AttivioException
storeName
- namespace for the contentid
- id for the contentAttivioException
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.