Açıklama Yok

2a45b32053f9325e9d7008df3f2b096ef330b0da.svn-base 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package com.rdlze.radializebase.interfaces;
  2. import java.io.Serializable;
  3. import java.rmi.Remote;
  4. import java.rmi.RemoteException;
  5. import java.util.HashSet;
  6. import java.util.List;
  7. import com.rdlze.radializeutils.objects.Radio;
  8. public interface InterfaceCrawlerSlave extends Remote, Serializable {
  9. public static final int TYPE_MD_CRAWLER = 0;
  10. public static final int TYPE_MD_BY_STREAM_CRAWLER = 1;
  11. public static final int TYPE_MD_WITH_JAVA_BY_STREAM_CRAWLER = 2;
  12. public static final int TYPE_MD_WITH_MPLAYER_BY_STREAM_CRAWLER = 3;
  13. /**
  14. * Delivers a radio for the slave to crawl.
  15. * @param radio
  16. * @throws RemoteException
  17. */
  18. public void notify(Radio radio) throws RemoteException;
  19. /**
  20. * @return Name of the slave. In most case name is equals to IP.
  21. * @throws RemoteException
  22. */
  23. public String getName() throws RemoteException;
  24. /**
  25. * To check if slave is alive.
  26. * @return list of radios being crawled.
  27. * @throws RemoteException
  28. */
  29. public List<Integer> ping() throws RemoteException;
  30. /**
  31. * @return Actually the max radios the slave is able to crawl.
  32. * @throws RemoteException
  33. */
  34. public int getNumCores() throws RemoteException;
  35. /**
  36. * Most useful for streamslave, when the master is gonna distribute
  37. * radios, and the slave is reconnecting to master,
  38. * having radios already being crawled. So the master will check if more radios are needed
  39. * instead of send more.
  40. * @return The number of radios being crawled at the moment.
  41. * @throws RemoteException
  42. */
  43. public HashSet<Integer> getCrawlingNow() throws RemoteException;
  44. /**
  45. * Delivers a list of radios for the slave to crawl.
  46. * @param toNotify
  47. * @throws RemoteException
  48. */
  49. public void notify(List<Radio> toNotify) throws RemoteException;
  50. /**
  51. * Defines if the slaves connect only to metadata pages
  52. * or monitor streams to get metadata as soon as they change
  53. * @return
  54. * @throws RemoteException
  55. */
  56. public int getCrawlerType() throws RemoteException;
  57. }