congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
KryoManager.serialize
Code IndexAdd Tabnine to your IDE (free)

How to use
serialize
method
in
org.chronos.common.serialization.KryoManager

Best Java code snippets using org.chronos.common.serialization.KryoManager.serialize (Showing top 9 results out of 315)

origin: MartinHaeusler/chronos

@Override
public byte[] serialize(final Object object) {
  return KryoManager.serialize(object);
}
origin: MartinHaeusler/chronos

public PropertyRecord(final String key, final Object value) {
  checkNotNull(key, "Precondition violation - argument 'key' must not be NULL!");
  checkNotNull(value, "Precondition violation - argument 'value' must not be NULL!");
  this.key = key;
  this.value = KryoManager.serialize(value);
}
origin: MartinHaeusler/chronos

public void setIndexer(final Indexer<?> indexer) {
  if (indexer == null) {
    this.indexerData = null;
  } else {
    byte[] serialForm = KryoManager.serialize(indexer);
    this.indexerData = Base64.getEncoder().encodeToString(serialForm);
  }
}
origin: MartinHaeusler/chronos

public static void insertOrUpdate(final TuplTransaction tx, final IBranchMetadata metadata) {
  checkNotNull(tx, "Precondition violation - argument 'tx' must not be NULL!");
  checkNotNull(metadata, "Precondition violation - argument 'metadata' must not be NULL!");
  tx.store(NAME, metadata.getName(), KryoManager.serialize(metadata));
}
origin: MartinHaeusler/chronos

public BinaryPropertyDump(final PropertyRecord record) {
  super(record.getKey());
  this.value = KryoManager.serialize(record.getValue());
}
origin: MartinHaeusler/chronos

tx.store(NAME, branchName, KryoManager.serialize(keyspaceToMetadata));
logTrace("Inserting into NavigationMap. Branch = '" + branchName + "', keypsace = '" + keyspaceName
    + "', matrix = '" + matrixName + "'");
origin: MartinHaeusler/chronos

@Test
public void canSerializeAndDeserialize() {
  Person johnDoe = new Person("John", "Doe");
  byte[] bytes = KryoManager.serialize(johnDoe);
  assertNotNull(bytes);
  Person deserialized = KryoManager.deserialize(bytes);
  assertEquals(johnDoe, deserialized);
}
origin: MartinHaeusler/chronos

@Test
@SuppressWarnings("unchecked")
public void canSerializeAndDeserializeMultipleTrees() {
  ImmutableMap<String, String> map = ImmutableMaps.newHashArrayMappedTreeMap();
  ImmutableMap<String, String> map1 = map.put("Hello", "World");
  ImmutableMap<String, String> map2 = map.put("Foo", "Bar");
  ImmutableMap<String, String> map3 = map.put("Number", "42");
  List<ImmutableMap<String, String>> allVersions = Lists.newArrayList(map, map1, map2, map3);
  byte[] bytes = KryoManager.serialize(allVersions);
  List<ImmutableMap<String, String>> allVersions2 = KryoManager.deserialize(bytes);
  assertNotNull(allVersions2);
  assertEquals(allVersions, allVersions2);
}
origin: MartinHaeusler/chronos

@Test
public void canSerializeAndDeserializeSingleTree() {
  ImmutableMap<String, String> map = ImmutableMaps.newHashArrayMappedTreeMap();
  map = map.put("Hello", "World");
  map = map.put("Foo", "Bar");
  map = map.put("Number", "42");
  byte[] bytes = KryoManager.serialize(map);
  ImmutableMap<String, String> map2 = KryoManager.deserialize(bytes);
  assertNotNull(map2);
  assertEquals(map.entrySet(), map2.entrySet());
  for (Entry<String, String> entry : map.entrySet()) {
    assertEquals(entry.getValue(), map2.get(entry.getKey()));
  }
  for (Entry<String, String> entry : map2.entrySet()) {
    assertEquals(entry.getValue(), map.get(entry.getKey()));
  }
}
org.chronos.common.serializationKryoManagerserialize

Popular methods of KryoManager

  • deserialize
  • deepCopy
  • deserializeObjectsFromFile
  • serializeObjectsToFile
  • deserializeObjectFromFile
  • destroyKryo
  • getKryo
  • produceKryoWrapper

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Permission (java.security)
    Legacy security code; do not use.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JComboBox (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now