Tabnine Logo
DsoSerializationStrategy$OOS
Code IndexAdd Tabnine to your IDE (free)

How to use
DsoSerializationStrategy$OOS
in
org.terracotta.cache.serialization

Best Java code snippets using org.terracotta.cache.serialization.DsoSerializationStrategy$OOS (Showing top 12 results out of 315)

origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) {
  return (String) key;
 }
 ByteArrayOutputStream bos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new OOS(bos, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return bos.toString(0x00);
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

@Override
public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) {
  String stringKey = (String) key;
  // disallow Strings that start with our marker
  if (stringKey.length() >= 1) {
   if (stringKey.charAt(0) == MARKER) {
    //
    throw new IOException("Illegal string key: " + stringKey);
   }
  }
  return stringKey;
 }
 StringSerializedObjectOutputStream out = new StringSerializedObjectOutputStream();
 ObjectOutputStream oos = new OOS(out, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return out.toString();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

@Override
public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) {
  String stringKey = (String) key;
  // disallow Strings that start with our marker
  if (stringKey.length() >= 1) {
   if (stringKey.charAt(0) == MARKER) {
    //
    throw new IOException("Illegal string key: " + stringKey);
   }
  }
  return stringKey;
 }
 StringSerializedObjectOutputStream out = new StringSerializedObjectOutputStream();
 ObjectOutputStream oos = new OOS(out, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return out.toString();
}
origin: org.terracotta.modules/tim-ehcache-1.7

 @Override
 public byte[] serialize(final AbstractElementData element) throws IOException {
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  OOS oos = new OOS(baos, oscSerializer);
  element.write(oos);
  oos.close();
  return baos.toByteArray();
 }
}
origin: org.terracotta.modules/tim-ehcache-2.0

 @Override
 public byte[] serialize(final AbstractElementData element) throws IOException {
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  OOS oos = new OOS(baos, oscSerializer);
  element.write(oos);
  oos.close();
  return baos.toByteArray();
 }
}
origin: org.terracotta.modules/tim-distributed-cache

public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) { return (String) key; }
 ByteArrayOutputStream bos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new OOS(bos, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return bos.toString(0x00);
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) { return (String) key; }
 ByteArrayOutputStream bos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new OOS(bos, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return bos.toString(0x00);
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

public String generateStringKeyFor(final Object key) throws IOException {
 if (key instanceof String) { return (String) key; }
 ByteArrayOutputStream bos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new OOS(bos, oscSerializer);
 writeStringKey(key, oos);
 oos.close();
 return bos.toString(0x00);
}
origin: org.terracotta.modules/tim-distributed-cache

public byte[] serialize(final T value) throws IOException {
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 OOS oos = new OOS(baos, oscSerializer);
 oos.writeObject(value);
 oos.close();
 return baos.toByteArray();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

public byte[] serialize(final T value) throws IOException {
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 OOS oos = new OOS(baos, oscSerializer);
 oos.writeObject(value);
 oos.close();
 return baos.toByteArray();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

public byte[] serialize(final T value) throws IOException {
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 OOS oos = new OOS(baos, oscSerializer);
 oos.writeObject(value);
 oos.close();
 return baos.toByteArray();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

public byte[] serialize(final T value) throws IOException {
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 OOS oos = new OOS(baos, oscSerializer);
 oos.writeObject(value);
 oos.close();
 return baos.toByteArray();
}
org.terracotta.cache.serializationDsoSerializationStrategy$OOS

Most used methods

  • <init>
  • close
  • writeObject

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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