Class JniYMap

java.lang.Object
net.carcdr.ycrdt.jni.JniYMap
All Implemented Interfaces:
AutoCloseable, net.carcdr.ycrdt.YMap

public class JniYMap extends Object implements net.carcdr.ycrdt.YMap
YMap represents a collaborative map type in a Y-CRDT document.

YMap provides efficient collaborative map operations with automatic conflict resolution. Multiple users can modify the same map simultaneously, and changes will be merged automatically using CRDT algorithms.

This class implements Closeable and should be used with try-with-resources to ensure proper cleanup of native resources.

Example usage:


 try (YDoc doc = new JniYDoc();
      YMap map = doc.getMap("mymap")) {
     map.setString("name", "Alice");
     map.setDouble("age", 30.0);
     System.out.println(map.toJson()); // {"name":"Alice","age":30.0}
 }
 
See Also:
  • YDoc