You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2022/01/09 09:01:42 UTC
[incubator-tuweni] branch main updated: move PersistenceMarshaller to kv
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
The following commit(s) were added to refs/heads/main by this push:
new 298a649 move PersistenceMarshaller to kv
new 4898070 Merge pull request #355 from atoulme/move_persistencemarshaller
298a649 is described below
commit 298a64929c1d6e9c307281c7541154d70f6fd866
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Sat Jan 8 23:20:24 2022 -0800
move PersistenceMarshaller to kv
---
.../src/main/kotlin/org/apache/tuweni/ethclient/EthereumClient.kt | 1 +
.../src/main/kotlin/org/apache/tuweni/kv}/PersistenceMarshaller.kt | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/EthereumClient.kt b/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/EthereumClient.kt
index a410c21..48f729b 100644
--- a/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/EthereumClient.kt
+++ b/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/EthereumClient.kt
@@ -43,6 +43,7 @@ import org.apache.tuweni.metrics.MetricsService
import org.apache.tuweni.kv.InfinispanKeyValueStore
import org.apache.tuweni.kv.LevelDBKeyValueStore
import org.apache.tuweni.kv.MapKeyValueStore
+import org.apache.tuweni.kv.PersistenceMarshaller
import org.apache.tuweni.rlpx.RLPxService
import org.apache.tuweni.rlpx.vertx.VertxRLPxService
import org.apache.tuweni.units.bigints.UInt256
diff --git a/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/PersistenceMarshaller.kt b/kv/src/main/kotlin/org/apache/tuweni/kv/PersistenceMarshaller.kt
similarity index 93%
rename from eth-client/src/main/kotlin/org/apache/tuweni/ethclient/PersistenceMarshaller.kt
rename to kv/src/main/kotlin/org/apache/tuweni/kv/PersistenceMarshaller.kt
index 083de68..e0508ab 100644
--- a/eth-client/src/main/kotlin/org/apache/tuweni/ethclient/PersistenceMarshaller.kt
+++ b/kv/src/main/kotlin/org/apache/tuweni/kv/PersistenceMarshaller.kt
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.tuweni.ethclient
+package org.apache.tuweni.kv
import org.apache.tuweni.bytes.Bytes
import org.infinispan.commons.dataconversion.MediaType
@@ -22,6 +22,9 @@ import org.infinispan.commons.io.ByteBuffer
import org.infinispan.commons.io.ByteBufferImpl
import org.infinispan.commons.marshall.AbstractMarshaller
+/**
+ * Utility class to store Bytes objects in Infinispan key-value stores.
+ */
class PersistenceMarshaller : AbstractMarshaller() {
override fun objectFromByteBuffer(buf: ByteArray?, offset: Int, length: Int) = Bytes.wrap(buf!!, offset, length)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org