mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: add nodeRecovered flag to mediaNodeUsageRegistration method
parent
239b7e28bf
commit
f70053c2f3
|
@ -140,16 +140,15 @@ public class Kms {
|
||||||
return this.isKurentoClientConnected.get();
|
return this.isKurentoClientConnected.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKurentoClientConnected(boolean isConnected, boolean reconnection) {
|
public void setKurentoClientConnected(boolean isConnected, boolean nodeRecovered) {
|
||||||
final long timestamp = System.currentTimeMillis();
|
final long timestamp = System.currentTimeMillis();
|
||||||
this.isKurentoClientConnected.set(isConnected);
|
this.isKurentoClientConnected.set(isConnected);
|
||||||
if (isConnected) {
|
if (isConnected) {
|
||||||
this.setTimeOfKurentoClientConnection(timestamp);
|
this.setTimeOfKurentoClientConnection(timestamp);
|
||||||
this.setTimeOfKurentoClientDisconnection(0);
|
this.setTimeOfKurentoClientDisconnection(0);
|
||||||
this.setHasTriggeredNodeCrashedEvent(false);
|
this.setHasTriggeredNodeCrashedEvent(false);
|
||||||
if (!reconnection) {
|
kmsManager.getMediaNodeManager().mediaNodeUsageRegistration(this, timestamp, kmsManager.getKmss(),
|
||||||
kmsManager.getMediaNodeManager().mediaNodeUsageRegistration(this, timestamp, kmsManager.getKmss());
|
nodeRecovered);
|
||||||
}
|
|
||||||
if (this.mediaServer == null) {
|
if (this.mediaServer == null) {
|
||||||
this.fetchMediaServerType();
|
this.fetchMediaServerType();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import io.openvidu.server.kurento.kms.Kms;
|
||||||
|
|
||||||
public interface MediaNodeManager {
|
public interface MediaNodeManager {
|
||||||
|
|
||||||
public void mediaNodeUsageRegistration(Kms kms, long timeOfConnection, Collection<Kms> existingKmss);
|
public void mediaNodeUsageRegistration(Kms kms, long timeOfConnection, Collection<Kms> existingKmss, boolean nodeRecovered);
|
||||||
|
|
||||||
public void mediaNodeUsageDeregistration(String mediaNodeId, long timeOfDisconnection);
|
public void mediaNodeUsageDeregistration(String mediaNodeId, long timeOfDisconnection);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ import io.openvidu.server.kurento.kms.Kms;
|
||||||
public class MediaNodeManagerDummy implements MediaNodeManager {
|
public class MediaNodeManagerDummy implements MediaNodeManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mediaNodeUsageRegistration(Kms kms, long timeOfConnection, Collection<Kms> existingKmss) {
|
public void mediaNodeUsageRegistration(Kms kms, long timeOfConnection, Collection<Kms> existingKmss,
|
||||||
|
boolean nodeRecovered) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue