mirror of https://github.com/apache/lucene.git
Renamed a new class and updated some javadoc.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149815 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
28eb95821f
commit
22f068248d
|
@ -112,7 +112,7 @@
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<rmic classname="org.apache.lucene.search.RemoteSearchableImpl"
|
<rmic classname="org.apache.lucene.search.RemoteSearchable"
|
||||||
base="${build.classes}">
|
base="${build.classes}">
|
||||||
<classpath refid="classpath"/>
|
<classpath refid="classpath"/>
|
||||||
</rmic>
|
</rmic>
|
||||||
|
|
|
@ -65,14 +65,14 @@ import java.rmi.RMISecurityManager;
|
||||||
import java.rmi.server.UnicastRemoteObject;
|
import java.rmi.server.UnicastRemoteObject;
|
||||||
|
|
||||||
/** A remote searchable implementation. */
|
/** A remote searchable implementation. */
|
||||||
public class RemoteSearchableImpl
|
public class RemoteSearchable
|
||||||
extends UnicastRemoteObject
|
extends UnicastRemoteObject
|
||||||
implements Searchable {
|
implements Searchable {
|
||||||
|
|
||||||
private Searchable local;
|
private Searchable local;
|
||||||
|
|
||||||
/** Constructs and exports a remote searcher. */
|
/** Constructs and exports a remote searcher. */
|
||||||
public RemoteSearchableImpl(Searchable local) throws RemoteException {
|
public RemoteSearchable(Searchable local) throws RemoteException {
|
||||||
super();
|
super();
|
||||||
this.local = local;
|
this.local = local;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ public class RemoteSearchableImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
Searchable local = new IndexSearcher(args[0]);
|
Searchable local = new IndexSearcher(args[0]);
|
||||||
RemoteSearchableImpl impl = new RemoteSearchableImpl(local);
|
RemoteSearchable impl = new RemoteSearchable(local);
|
||||||
|
|
||||||
// bind the implementation to "Searchable"
|
// bind the implementation to "Searchable"
|
||||||
Naming.rebind("//localhost/Searchable", impl);
|
Naming.rebind("//localhost/Searchable", impl);
|
|
@ -59,7 +59,11 @@ import org.apache.lucene.document.Document;
|
||||||
import org.apache.lucene.index.Term;
|
import org.apache.lucene.index.Term;
|
||||||
import org.apache.lucene.index.IndexReader;
|
import org.apache.lucene.index.IndexReader;
|
||||||
|
|
||||||
/** The interface for search implementations. */
|
/** The interface for search implementations.
|
||||||
|
*
|
||||||
|
* <p>Implementations provide search over a single index, over multiple
|
||||||
|
* indices, and over indices on remote servers.
|
||||||
|
*/
|
||||||
public interface Searchable extends java.rmi.Remote {
|
public interface Searchable extends java.rmi.Remote {
|
||||||
/** Lower-level search API.
|
/** Lower-level search API.
|
||||||
*
|
*
|
||||||
|
|
|
@ -59,10 +59,8 @@ import org.apache.lucene.document.Document;
|
||||||
import org.apache.lucene.index.Term;
|
import org.apache.lucene.index.Term;
|
||||||
import org.apache.lucene.index.IndexReader;
|
import org.apache.lucene.index.IndexReader;
|
||||||
|
|
||||||
/** The abstract base class for search implementations.
|
/** An abstract base class for search implementations.
|
||||||
*
|
* Implements some common utility methods.
|
||||||
* <p>Subclasses implement search over a single index, over multiple indices,
|
|
||||||
* and over indices on remote servers.
|
|
||||||
*/
|
*/
|
||||||
public abstract class Searcher implements Searchable {
|
public abstract class Searcher implements Searchable {
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,6 @@ import java.rmi.registry.LocateRegistry;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.apache.lucene.search.IndexSearcher;
|
|
||||||
import org.apache.lucene.search.MultiSearcher;
|
|
||||||
import org.apache.lucene.index.Term;
|
import org.apache.lucene.index.Term;
|
||||||
import org.apache.lucene.index.IndexWriter;
|
import org.apache.lucene.index.IndexWriter;
|
||||||
import org.apache.lucene.store.RAMDirectory;
|
import org.apache.lucene.store.RAMDirectory;
|
||||||
|
@ -87,7 +85,7 @@ public class TestRemoteSearchable extends TestCase {
|
||||||
// publish it
|
// publish it
|
||||||
LocateRegistry.createRegistry(1099);
|
LocateRegistry.createRegistry(1099);
|
||||||
Searchable local = new IndexSearcher(indexStore);
|
Searchable local = new IndexSearcher(indexStore);
|
||||||
RemoteSearchableImpl impl = new RemoteSearchableImpl(local);
|
RemoteSearchable impl = new RemoteSearchable(local);
|
||||||
Naming.rebind("//localhost/Searchable", impl);
|
Naming.rebind("//localhost/Searchable", impl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue