Made javadoc review.

This commit is contained in:
Christian P. MOMON 2024-08-23 12:17:29 +02:00
parent 5aaf1bf9f4
commit 4018f2cc15
6 changed files with 84 additions and 40 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr>
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
*
* This file is part of SikevaDB, simple key value database.
*
@ -20,8 +20,6 @@ package fr.devinsy.sikevadb.core;
/**
* The Interface Archiver.
*
* @author Christian Pierre MOMON
*/
public interface Archiver
{
@ -31,17 +29,50 @@ public interface Archiver
SUSPENDED
}
/**
* Activate.
*/
void activate();
/**
* Archive.
*
* @param element
* the element
* @throws SikevaDBException
* the sikeva DB exception
*/
void archive(Element element) throws SikevaDBException;
/**
* Clear.
*
* @throws SikevaDBException
* the sikeva DB exception
*/
void clear() throws SikevaDBException;
/**
* Close.
*/
void close();
/**
* Checks if is activated.
*
* @return true, if is activated
*/
boolean isActivated();
/**
* Checks if is suspended.
*
* @return true, if is suspended
*/
boolean isSuspended();
/**
* Suspend.
*/
void suspend();
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
* Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
*
* This file is part of SikevaDB, simple key value database.
*
@ -19,15 +19,14 @@
package fr.devinsy.sikevadb.core;
/**
*
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
* The Class ClosedDatabaseException.
*/
public class ClosedDatabaseException extends SikevaDBException
{
private static final long serialVersionUID = 8364599416669077052L;
/**
*
* Instantiates a new closed database exception.
*/
public ClosedDatabaseException()
{
@ -35,8 +34,10 @@ public class ClosedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new closed database exception.
*
* @param message
* the message
*/
public ClosedDatabaseException(final String message)
{
@ -44,9 +45,12 @@ public class ClosedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new closed database exception.
*
* @param message
* the message
* @param cause
* the cause
*/
public ClosedDatabaseException(final String message, final Throwable cause)
{
@ -54,8 +58,10 @@ public class ClosedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new closed database exception.
*
* @param cause
* the cause
*/
public ClosedDatabaseException(final Throwable cause)
{

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
* Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
*
* This file is part of SikevaDB, simple key value database.
*
@ -19,15 +19,14 @@
package fr.devinsy.sikevadb.core;
/**
*
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
* The Class OpenedDatabaseException.
*/
public class OpenedDatabaseException extends SikevaDBException
{
private static final long serialVersionUID = 8364599416669077052L;
/**
*
* Instantiates a new opened database exception.
*/
public OpenedDatabaseException()
{
@ -35,8 +34,10 @@ public class OpenedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new opened database exception.
*
* @param message
* the message
*/
public OpenedDatabaseException(final String message)
{
@ -44,9 +45,12 @@ public class OpenedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new opened database exception.
*
* @param message
* the message
* @param cause
* the cause
*/
public OpenedDatabaseException(final String message, final Throwable cause)
{
@ -54,8 +58,10 @@ public class OpenedDatabaseException extends SikevaDBException
}
/**
* Instantiates a new opened database exception.
*
* @param cause
* the cause
*/
public OpenedDatabaseException(final Throwable cause)
{

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr>
* Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
*
* This file is part of SikevaDB, simple key value database.
*
@ -284,18 +284,28 @@ public interface SikevaDB
public String getValue(String key, String subkey) throws SikevaDBException;
/**
* Gets the values of a key.
* Gets the values.
*
* @param key
* the key
* @return the values
* @throws SikevaDBException
* the SikevaDB exception
* the sikeva DB exception
*/
public StringList getValues(String key) throws SikevaDBException;
/**
* Checks if is archive activated.
*
* @return true, if is archive activated
*/
boolean isArchiveActivated();
/**
* Checks if is archive suspended.
*
* @return true, if is archive suspended
*/
boolean isArchiveSuspended();
/**

View file

@ -41,22 +41,20 @@ import fr.devinsy.xml.XMLZipWriter;
/**
* The Class XMLSikevaDB represents a XML persister.
*
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
*/
public class XMLSikevaDB
{
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
/**
* Export in XML a database in a file.
* Export.
*
* @param out
* the out
* @param source
* the source
* @throws SikevaDBException
* the SikevaDB exception
* the sikeva DB exception
* @throws FileNotFoundException
* the file not found exception
*/
@ -152,9 +150,6 @@ public class XMLSikevaDB
* the database
* @param file
* the file
*
* @throws Exception
* the exception
*/
public static void importData(final SikevaDB database, final File file)
{
@ -178,6 +173,7 @@ public class XMLSikevaDB
* the in
* @return the element
* @throws SikevaDBException
* the sikeva DB exception
*/
public static Element readElement(final XMLReader in) throws SikevaDBException
{
@ -248,12 +244,8 @@ public class XMLSikevaDB
* the target
* @param in
* the in
* @throws XMLBadFormatException
* @throws XMLStreamException
* @throws SikevaDBException
*
* @throws Exception
* the exception
* the sikeva DB exception
*/
public static void readElements(final SikevaDB target, final XMLReader in) throws SikevaDBException
{
@ -350,9 +342,7 @@ public class XMLSikevaDB
* @param source
* the source
* @throws SikevaDBException
*
* @throws Exception
* the exception
* the sikeva DB exception
*/
public static void write(final XMLWriter out, final SikevaDB source) throws SikevaDBException
{

View file

@ -133,6 +133,7 @@ public class SQLSikevaDB implements SikevaDB
* Activate archiver.
*
* @throws ClosedDatabaseException
* the closed database exception
*/
public void activateArchiver() throws ClosedDatabaseException
{