Beispiel #1
0
 /** Called from the ExecutionEngine to request serialized dependencies. */
 public byte[] nextDependencyAsBytes(final int dependencyId) {
   final VoltTable vt = m_dependencyTracker.nextDependency(dependencyId);
   if (vt != null) {
     final ByteBuffer buf2 = vt.getTableDataReference();
     byte[] bytes = buf2.array();
     // if a buffer has an offset, just getting the array will give you the wrong thing
     if (buf2.arrayOffset() != 0) {
       bytes = Arrays.copyOfRange(bytes, buf2.arrayOffset(), bytes.length);
     }
     return bytes;
   } else {
     return null;
   }
 }