/* Richard A. DeVenezia * SUGI 29 - "Greetings from the Edge" * www.devenezia.com/papers */ import java.rmi.Remote; import java.rmi.RemoteException; // This wrapper class exists only because DATA Step JavaObj cannot deal with java methods // that return objects, such as the reference returned by HashServer.getReferenceToPersistentManager // // If DATA Step is ever updated to handle javaobj methods that return objects, this wrapper // class will not be needed public class DataStepHashAdapter { private HashInterface hi; public DataStepHashAdapter() throws Exception { hi = HashServer.getReferenceToPersistentManager (); } public int getHashHandle (double size, double load) throws Exception { return hi.getHashHandle ( (int) size, (float)load); } public void freeHashHandle (double handle) throws Exception { hi.freeHashHandle ( (int) handle); } public void put (double handle, String key, String value) throws Exception { hi.put ( (int) handle, key, value); } public void put (double handle, String key, double value) throws Exception { hi.put ( (int) handle, key, value); } public void put (double handle, double key, String value) throws Exception { hi.put ( (int) handle, key, value); } public void put (double handle, double key, double value) throws Exception { hi.put ( (int) handle, key, value); } public String getString (double handle, String key) throws Exception { return hi.getString ( (int) handle, key); } public String getString (double handle, double key) throws Exception { return hi.getString ( (int) handle, key); } public double getDouble (double handle, String key) throws Exception { return hi.getDouble ( (int) handle, key); } public double getDouble (double handle, double key) throws Exception { return hi.getDouble ( (int) handle, key); } }