Tabnine Logo
DsoSerializationStrategy$OOS.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

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.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.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

@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.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.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<init>

Popular methods of DsoSerializationStrategy$OOS

  • close
  • writeObject

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JComboBox (javax.swing)
  • Best IntelliJ 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