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
IOException
void commit() throws IOException
IOException
void rollback() throws IOException
IOException
void optimize() throws IOException
IOException
void close(boolean deleteFiles) throws IOException
deleteFiles
- True, if the index files should be deleted.IOException
void close() throws IOException
close(false)
IOException
boolean isOpen()
false
, after the close()
method
has been called.true
, if the close()
method has not been called, otherwise false
void purge() throws IOException
IOException
boolean supports(Class<?> clazz)
clazz
- <T> T getBaseContext(Class<T> clazz) throws UnsupportedBaseContextException
clazz
- the specific classUnsupportedOperationException
- if the implementation is not supportedUnsupportedBaseContextException
Set<String> getGroups() throws IOException
IOException
void updateTimestamp(boolean save) throws IOException
save
- IOException
void updateTimestamp(boolean save, ZonedDateTime time) throws IOException
save
- time
- IOException
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.