123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- package com.rdlze.radializebase.interfaces;
- import java.io.Serializable;
- import java.rmi.Remote;
- import java.rmi.RemoteException;
- import com.rdlze.radializeutils.objects.BigTitleResp;
- import com.rdlze.radializeutils.objects.IndexResponse;
- /**
- * Remote Interface
- * @author stiilpen
- *
- */
- public interface InterfaceIdFinder extends Remote, Serializable {
- /**
- * Colector search method
- * @param artist name
- * @param music name
- * @return IndexResponse with idMedia,idArtist, idMusic. if one of these ids doesn't exists, returns -1, respectively.
- */
- public IndexResponse search(String artist, String music) throws RemoteException;
-
- /**
- * MBHttp makes search slow, so it parameter useMBHttp shall be false for
- * search server and update server.
- * @param artist
- * @param music
- * @param useMBHTTP
- * @return
- * @throws RemoteException
- */
- public IndexResponse search(String artist, String music, boolean useMBHTTP) throws RemoteException;
-
- /**
- * User search for music id
- * @param music
- * @return musicId if found, -1 if not.
- */
- public int searchMusic(String music) throws RemoteException;
-
-
- /**
- * User search for artist id
- * @param artist
- * @return artistId if found, -1 if not.
- */
- public int searchArtist(String artist) throws RemoteException;
-
- /**
- * User search for artist id by artist alias
- * @param artist
- * @return artistId if found, -1 if not.
- */
- public int searchArtistAlias(String artist) throws RemoteException;
-
- /**
- * User search for genre id by genre name
- * @param artist
- * @return artistId if found, -1 if not.
- */
- public int searchGenres(String genre) throws RemoteException;
-
- /**
- * Method to search radio and return the most compatible id
- * @param radio
- * @return
- */
- public int searchRadio(String radio) throws RemoteException;
-
- /**
- * Method to search tag and return the most compatible id
- * @param tag name
- * @return
- */
- public int searchTags(String tags) throws RemoteException;
-
- /**
- * UPDATE INSTANCE: Insert Media Index
- * @param name
- * @param idMedia
- * @param idArtist
- * @param idMusic
- * @return true if enqueued, false if not.
- */
- public boolean insertMedia(String name, int idMedia, int idArtist, int idMusic, String mbidArtist, String mbidMusic) throws RemoteException;
- /**
- * UPDATE INSTANCE: Insert Artist Index
- * @param name
- * @param idArtist
- * @return true if enqueued, false if not.
- */
- public boolean insertArtist(String name, int idArtist, String mbidArtist) throws RemoteException;
- /**
- * UPDATE INSTANCE: Insert Music Index
- * @param name
- * @param idMusic
- * @return true if enqueued, false if not.
- */
- public boolean insertMusic(String name, int idMusic, int artistId, String mbidMusic) throws RemoteException;
-
- /**
- * Searches artist and song contained in a single String
- * @param bigTitle
- * @param numResultsToBeAnalysed
- * @param shallContainResp the entry bigtitle MUST contain artist and song found on mb search.
- * @return
- * @throws RemoteException
- */
- public BigTitleResp searchBigTitle(String bigTitle, int numResultsToBeAnalysed, boolean shallContainResp) throws RemoteException;
- /**
- * Checks if the id finder is checking the differences between indexes and tables, so is shall not notified, and index the differences.
- * if any new content is inserted, the update server can do the defensive search and assure it will not insert any duplicates.
- * @return
- * @throws RemoteException
- * @throws Exception
- */
- public Boolean isSynching() throws RemoteException, Exception;
- /**
- * Allows the update server to request the idfinder to check differences between indexes and tables
- * @throws RemoteException
- */
- public void SynchonizeTableAndIndexes() throws RemoteException;
-
- public int getUpdaterQueueSize() throws RemoteException;
-
- }
|