-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix checkstyle issues in com.fauna.codec
- Loading branch information
Showing
51 changed files
with
1,300 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
package com.fauna.codec; | ||
|
||
/** | ||
* Interface defining a registry for codecs, which manage the serialization and deserialization of objects. | ||
* <p> | ||
* Provides methods for storing, retrieving, and checking for codecs by their unique keys. | ||
*/ | ||
public interface CodecRegistry { | ||
|
||
/** | ||
* Retrieves the codec associated with the specified key. | ||
* | ||
* @param key The unique key representing the codec. | ||
* @param <T> The type of the object handled by the codec. | ||
* @return The codec associated with the specified key, or {@code null} if not found. | ||
*/ | ||
<T> Codec<T> get(CodecRegistryKey key); | ||
|
||
/** | ||
* Registers a codec with the specified key in the registry. | ||
* | ||
* @param key The unique key representing the codec. | ||
* @param codec The codec to register. | ||
* @param <T> The type of the object handled by the codec. | ||
*/ | ||
<T> void put(CodecRegistryKey key, Codec<T> codec); | ||
|
||
/** | ||
* Checks if a codec is registered under the specified key. | ||
* | ||
* @param key The unique key representing the codec. | ||
* @return {@code true} if a codec exists for the specified key; {@code false} otherwise. | ||
*/ | ||
boolean contains(CodecRegistryKey key); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.