暫無描述

4c53b24772456bbb3521b8907f5e8e1126100cf8.svn-base 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. package com.rdlze.radializebase.interfaces;
  2. import java.io.Serializable;
  3. import java.rmi.Remote;
  4. import java.rmi.RemoteException;
  5. import com.rdlze.radializeutils.objects.BigTitleResp;
  6. import com.rdlze.radializeutils.objects.IndexResponse;
  7. /**
  8. * Remote Interface
  9. * @author stiilpen
  10. *
  11. */
  12. public interface InterfaceIdFinder extends Remote, Serializable {
  13. /**
  14. * Colector search method
  15. * @param artist name
  16. * @param music name
  17. * @return IndexResponse with idMedia,idArtist, idMusic. if one of these ids doesn't exists, returns -1, respectively.
  18. */
  19. public IndexResponse search(String artist, String music) throws RemoteException;
  20. /**
  21. * MBHttp makes search slow, so it parameter useMBHttp shall be false for
  22. * search server and update server.
  23. * @param artist
  24. * @param music
  25. * @param useMBHTTP
  26. * @return
  27. * @throws RemoteException
  28. */
  29. public IndexResponse search(String artist, String music, boolean useMBHTTP) throws RemoteException;
  30. /**
  31. * User search for music id
  32. * @param music
  33. * @return musicId if found, -1 if not.
  34. */
  35. public int searchMusic(String music) throws RemoteException;
  36. /**
  37. * User search for artist id
  38. * @param artist
  39. * @return artistId if found, -1 if not.
  40. */
  41. public int searchArtist(String artist) throws RemoteException;
  42. /**
  43. * User search for artist id by artist alias
  44. * @param artist
  45. * @return artistId if found, -1 if not.
  46. */
  47. public int searchArtistAlias(String artist) throws RemoteException;
  48. /**
  49. * User search for genre id by genre name
  50. * @param artist
  51. * @return artistId if found, -1 if not.
  52. */
  53. public int searchGenres(String genre) throws RemoteException;
  54. /**
  55. * Method to search radio and return the most compatible id
  56. * @param radio
  57. * @return
  58. */
  59. public int searchRadio(String radio) throws RemoteException;
  60. /**
  61. * Method to search tag and return the most compatible id
  62. * @param tag name
  63. * @return
  64. */
  65. public int searchTags(String tags) throws RemoteException;
  66. /**
  67. * UPDATE INSTANCE: Insert Media Index
  68. * @param name
  69. * @param idMedia
  70. * @param idArtist
  71. * @param idMusic
  72. * @return true if enqueued, false if not.
  73. */
  74. public boolean insertMedia(String name, int idMedia, int idArtist, int idMusic, String mbidArtist, String mbidMusic) throws RemoteException;
  75. /**
  76. * UPDATE INSTANCE: Insert Artist Index
  77. * @param name
  78. * @param idArtist
  79. * @return true if enqueued, false if not.
  80. */
  81. public boolean insertArtist(String name, int idArtist, String mbidArtist) throws RemoteException;
  82. /**
  83. * UPDATE INSTANCE: Insert Music Index
  84. * @param name
  85. * @param idMusic
  86. * @return true if enqueued, false if not.
  87. */
  88. public boolean insertMusic(String name, int idMusic, int artistId, String mbidMusic) throws RemoteException;
  89. /**
  90. * Searches artist and song contained in a single String
  91. * @param bigTitle
  92. * @param numResultsToBeAnalysed
  93. * @param shallContainResp the entry bigtitle MUST contain artist and song found on mb search.
  94. * @return
  95. * @throws RemoteException
  96. */
  97. public BigTitleResp searchBigTitle(String bigTitle, int numResultsToBeAnalysed, boolean shallContainResp) throws RemoteException;
  98. /**
  99. * Checks if the id finder is checking the differences between indexes and tables, so is shall not notified, and index the differences.
  100. * if any new content is inserted, the update server can do the defensive search and assure it will not insert any duplicates.
  101. * @return
  102. * @throws RemoteException
  103. * @throws Exception
  104. */
  105. public Boolean isSynching() throws RemoteException, Exception;
  106. /**
  107. * Allows the update server to request the idfinder to check differences between indexes and tables
  108. * @throws RemoteException
  109. */
  110. public void SynchonizeTableAndIndexes() throws RemoteException;
  111. public int getUpdaterQueueSize() throws RemoteException;
  112. }