voldemort.utils
Class NetworkClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by voldemort.utils.NetworkClassLoader

public class NetworkClassLoader
extends java.lang.ClassLoader

Network class Loader to load Classes on different JVMs needed to provide a User Defined Functions (Filter API) on the server side w/o needing to add jar on each server.


Constructor Summary
NetworkClassLoader(java.lang.ClassLoader parentClassLoader)
           
 
Method Summary
 byte[] dumpClass(java.lang.Class<?> cl)
          Utility function to convert Class --> byte[]
call ClassLoader.getResource(String) internally to find the class file and then dump the bytes[]
 java.lang.Class<?> loadClass(java.lang.String className, byte[] classBuffer, int offset, int length)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkClassLoader

public NetworkClassLoader(java.lang.ClassLoader parentClassLoader)
Method Detail

loadClass

public java.lang.Class<?> loadClass(java.lang.String className,
                                    byte[] classBuffer,
                                    int offset,
                                    int length)

dumpClass

public byte[] dumpClass(java.lang.Class<?> cl)
                 throws java.io.IOException
Utility function to convert Class --> byte[]
call ClassLoader.getResource(String) internally to find the class file and then dump the bytes[]

Parameters:
cl - The class
Returns:
Byte representation of the class
Throws:
java.io.IOException


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu