Skip to content

Commit

Permalink
fixed javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Linas Naginionis authored and Linas Naginionis committed Nov 19, 2019
1 parent 3009203 commit e6192f0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 6 deletions.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ org.gradle.daemon=true
org.gradle.configureondemand=true
ide.recursive=true
org.gradle.parallel=false
#release=true
signing.gnupg.executable=gpg
signing.gnupg.useLegacyGpg=true

VERSION_NAME=2.0.0
GROUP=net.soundvibe.paldb
Expand Down
1 change: 1 addition & 0 deletions paldb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jacocoTestReport {
if (project.hasProperty('release')) {

signing {
useGpgCmd()
sign configurations.archives
}

Expand Down
9 changes: 3 additions & 6 deletions paldb/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<p>
PalDB is an embeddable persistent write-once key-value store.
</p>
<h2>Code samples</h2>
<h1>Code samples</h1>

How to write a store:
<pre>
Expand All @@ -23,20 +23,17 @@ <h2>Code samples</h2>
How to iterate on a store:
<pre>
StoreReader reader = PalDB.createReader(new File("store.paldb"));
Iterable<Map.Entry<String, String>> iterable = reader.iterable();
for (Map.Entry<String, String> entry : iterable) {
Iterable&lt;Map.Entry&lt;String, String&gt;&gt; iterable = reader.iterable();
for (Map.Entry&lt;String, String&gt; entry : iterable) {
String key = entry.getKey();
String value = entry.getValue();
}
reader.close();
</pre>

<hr/>
<h2>API Changes</h2>
<p>
<ul>
<li>(April 2015) Initial API</li>
</ul>
</p>
</body>

Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ public <T> Class<T> getClass(String key)
* The class for with the serializer is being registered is directly extracted from the class definition.
*
* @param serializer serializer to register
* @param <T> serializer type
*/
public <T> void registerSerializer(Serializer<T> serializer) {
serializers.registerSerializer(serializer);
Expand Down
12 changes: 12 additions & 0 deletions paldb/src/main/java/com/linkedin/paldb/api/PalDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public interface PalDB {
* The file must exists.
*
* @param file a PalDB store file
* @param <K> key type
* @param <V> value type
* @return a store reader
*/
static <K,V> StoreReader<K,V> createReader(File file) {
Expand All @@ -47,6 +49,8 @@ static <K,V> StoreReader<K,V> createReader(File file) {
*
* @param file a PalDB store file
* @param config configuration
* @param <K> key type
* @param <V> value type
* @return a store reader
*/
static <K,V> StoreReader<K,V> createReader(File file, Configuration config) {
Expand All @@ -61,6 +65,8 @@ static <K,V> StoreReader<K,V> createReader(File file, Configuration config) {
*
* @param stream an input stream on a PalDB store file
* @param config configuration
* @param <K> key type
* @param <V> value type
* @return a store reader
*/
static <K,V> StoreReader<K,V> createReader(InputStream stream, Configuration config) {
Expand All @@ -73,6 +79,8 @@ static <K,V> StoreReader<K,V> createReader(InputStream stream, Configuration con
* The parent folder is created if missing.
*
* @param file location of the output file
* @param <K> key type
* @param <V> value type
* @return a store writer
*/
static <K,V> StoreWriter<K,V> createWriter(File file) {
Expand All @@ -86,6 +94,8 @@ static <K,V> StoreWriter<K,V> createWriter(File file) {
*
* @param file location of the output file
* @param config configuration
* @param <K> key type
* @param <V> value type
* @return a store writer
*/
static <K,V> StoreWriter<K,V> createWriter(File file, Configuration config) {
Expand All @@ -100,6 +110,8 @@ static <K,V> StoreWriter<K,V> createWriter(File file, Configuration config) {
*
* @param stream output stream
* @param config configuration
* @param <K> key type
* @param <V> value type
* @return a store writer
*/
static <K,V> StoreWriter<K,V> createWriter(OutputStream stream, Configuration config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public Serializers() {
* Registers the serializer.
*
* @param serializer serializer
* @param <T> serialized class type
*/
public synchronized <T> void registerSerializer(Serializer<T> serializer) {
var className = serializer.serializedClass().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public StorageSerialization(Configuration config) {
* Serializes the key object and returns it as a byte array.
*
* @param key key to serialize
* @param <K> key type
* @return key as byte array
* @throws IOException if an io error occurs
*/
Expand Down

0 comments on commit e6192f0

Please sign in to comment.