public interface ArchivaIndexingContext
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the context without deleting the files.
|
void |
close(boolean deleteFiles)
Closes any resources, this context has open.
|
void |
commit()
Writes the last changes to the index.
|
<T> T |
getBaseContext(Class<T> clazz)
Returns the repository specific implementation of the index.
|
Set<String> |
getGroups()
Returns the list of groups that are assigned to this index
|
String |
getId()
The identifier of the context
|
StorageAsset |
getPath()
The path where the index is stored.
|
Repository |
getRepository()
Returns the repository this index context is associated to.
|
boolean |
isEmpty()
Returns true, if the index has no entries or is not initialized.
|
boolean |
isOpen()
Returns the status of this context.
|
void |
optimize()
Optimizes the index
|
void |
purge()
Removes all entries from the index.
|
void |
rollback()
Throws away the last changes.
|
boolean |
supports(Class<?> clazz)
Returns true, if this index implementation has support for the given repository specific
implementation class.
|
void |
updateTimestamp(boolean save)
Updates the timestamp of the index.
|
void |
updateTimestamp(boolean save,
ZonedDateTime time)
Updates the timestamp with the given time.
|
Repository getRepository()
StorageAsset getPath()
boolean isEmpty() throws IOException
IOExceptionvoid commit() throws IOException
IOExceptionvoid rollback() throws IOException
IOExceptionvoid optimize() throws IOException
IOExceptionvoid close(boolean deleteFiles) throws IOException
deleteFiles - True, if the index files should be deleted.IOExceptionvoid close() throws IOException
close(false)IOExceptionboolean isOpen()
false, after the close() method
has been called.true, if the close() method has not been called, otherwise falsevoid purge() throws IOException
IOExceptionboolean supports(Class<?> clazz)
clazz - <T> T getBaseContext(Class<T> clazz) throws UnsupportedBaseContextException
clazz - the specific classUnsupportedOperationException - if the implementation is not supportedUnsupportedBaseContextExceptionSet<String> getGroups() throws IOException
IOExceptionvoid updateTimestamp(boolean save) throws IOException
save - IOExceptionvoid updateTimestamp(boolean save, ZonedDateTime time) throws IOException
save - time - IOExceptionCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.