|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
org.alfresco.bm.classloader.zookeeper.ZooKeeperClassLoader
public class ZooKeeperClassLoader
A Java ClassLoader pulling classes from ZooKeeper.
| Constructor Summary | |
|---|---|
ZooKeeperClassLoader(ClassLoader parentClassloader,
org.I0Itec.zkclient.ZkClient zk,
String rootPath)
|
|
| Method Summary | |
|---|---|
void |
addListener(ClassLoaderListener listener)
Add a change listener |
void |
handleChildChange(String parentPath,
List<String> currentChilds)
Calls any listeners. |
void |
handleDataChange(String dataPath,
Object data)
Calls any listeners. |
void |
handleDataDeleted(String dataPath)
Calls any listeners. |
Class<?> |
loadClass(String name)
Takes the rootPath variable and
finds (using '/' in place of '.') the class in
ZooKeeper. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZooKeeperClassLoader(ClassLoader parentClassloader,
org.I0Itec.zkclient.ZkClient zk,
String rootPath)
parentClassloader - the (required) parent class loaderzk - the ZK client to run againstrootPath - the ZK root path (akin to a classpath entry)| Method Detail |
|---|
public void handleChildChange(String parentPath,
List<String> currentChilds)
throws Exception
handleChildChange in interface org.I0Itec.zkclient.IZkChildListenerException
public void handleDataChange(String dataPath,
Object data)
throws Exception
handleDataChange in interface org.I0Itec.zkclient.IZkDataListenerException
public void handleDataDeleted(String dataPath)
throws Exception
handleDataDeleted in interface org.I0Itec.zkclient.IZkDataListenerExceptionpublic void addListener(ClassLoaderListener listener)
addListener in interface CallbackClassLoaderlistener - the listener that will be called if there are any
changes to classes already loaded
public Class<?> loadClass(String name)
throws ClassNotFoundException
rootPath variable and
finds (using '/' in place of '.') the class in
ZooKeeper.
loadClass in class ClassLoaderClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||