Tabnine Logo
StreamingMarshaller.objectToByteBuffer
Code IndexAdd Tabnine to your IDE (free)

How to use
objectToByteBuffer
method
in
org.infinispan.marshall.StreamingMarshaller

Best Java code snippets using org.infinispan.marshall.StreamingMarshaller.objectToByteBuffer (Showing top 4 results out of 315)

origin: org.infinispan/infinispan-cachestore-jdbm

@Override
public byte[] serialize(Object obj) throws IOException {
  try {
   return marshaller.objectToByteBuffer(obj);
  } catch (InterruptedException e) {
   if (log.isTraceEnabled()) log.trace("Interrupted while serializing object"); 
   Thread.currentThread().interrupt();
   throw new IOException(e);
  }
}
origin: org.infinispan/infinispan-cachestore-jdbm

private byte[] marshall(InternalCacheEntry entry) throws IOException, InterruptedException {
 return getMarshaller().objectToByteBuffer(entry.toInternalCacheValue());
}
origin: org.infinispan/infinispan-cachestore-bdbje

  @Override
  public void objectToEntry(InternalCacheEntry object, DatabaseEntry entry) {
   byte[] b;
   try {
     b = m.objectToByteBuffer(object);
   } catch (IOException e) {
     throw new RuntimeExceptionWrapper(e);
   } catch (InterruptedException ie) {
     Thread.currentThread().interrupt();
     throw new RuntimeExceptionWrapper(ie);
   }
   entry.setData(b);
  }
}
origin: org.infinispan/infinispan-custom52x-store

@Override
public void updateBucket(Bucket b) throws CacheLoaderException {
 File f = new File(root, b.getBucketIdAsString());
 if (f.exists()) {
   if (!purgeFile(f)) {
    log.problemsRemovingFile(f);
   } else if (trace) {
    log.tracef("Successfully deleted file: '%s'", f.getName());
   }
 }
 if (!b.getEntries().isEmpty()) {
   try {
    byte[] bytes = marshaller.objectToByteBuffer(b);
    fileSync.write(bytes, f);
   } catch (IOException ex) {
    log.errorSavingBucket(b, ex);
    throw new CacheLoaderException(ex);
   } catch (InterruptedException ie) {
    if (trace) {
      log.trace("Interrupted while marshalling a bucket");
    }
    Thread.currentThread().interrupt(); // Restore interrupted status
   }
 }
}
org.infinispan.marshallStreamingMarshallerobjectToByteBuffer

Popular methods of StreamingMarshaller

  • finishObjectInput
    Finish using the given ObjectInput. After opening a ObjectInput and calling objectFromObjectStream()
  • objectFromByteBuffer
  • objectFromObjectStream
    Unmarshalls an object from an java.io.ObjectInput
  • startObjectInput
    Create and open a new ObjectInput for the given input stream. This method should be used for opening
  • finishObjectOutput
    Finish using the given ObjectOutput. After opening a ObjectOutput and calling objectToObjectStream()
  • objectToObjectStream
    Marshalls an object to a given java.io.ObjectOutput
  • startObjectOutput

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • CodeWhisperer alternatives
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