package org.jboss.cache.loader.rmi;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.Map;
import java.util.Set;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.TreeCache;
public class RemoteTreeCacheImpl extends UnicastRemoteObject implements RemoteTreeCache {
private TreeCache cache;
public RemoteTreeCacheImpl(TreeCache cache) throws RemoteException {
this.cache=cache;
}
public Set getChildrenNames(Fqn fqn) throws Exception, RemoteException {
return this.cache.getChildrenNames(fqn);
}
public Object get(Fqn name, Object key) throws Exception, RemoteException {
return this.cache.get(name, key);
}
public Node get(Fqn name) throws Exception, RemoteException {
return this.cache.get(name);
}
public boolean exists(Fqn name) throws Exception, RemoteException {
return this.cache.exists(name);
}
public Object put(Fqn name, Object key, Object value) throws Exception, RemoteException {
return this.cache.put(name, key, value);
}
public void put(Fqn name, Map attributes) throws Exception, RemoteException {
this.cache.put(name, attributes);
}
public Object remove(Fqn name, Object key) throws Exception, RemoteException {
return this.cache.remove(name, key);
}
public void remove(Fqn name) throws Exception, RemoteException {
this.cache.remove(name);
}
public void removeData(Fqn name) throws Exception, RemoteException {
this.cache.removeData(name);
}
public byte[] getState() throws Exception, RemoteException {
return this.cache.getStateBytes();
}
public void setState(byte[] state) throws Exception, RemoteException {
this.cache.setStateBytes(state);
}
}