public class org.apache.dubbo.remoting.p2p.support.FileGroup extends org.apache.dubbo.remoting.p2p.support.AbstractGroup
{
private final java.io.File file;
private final java.util.concurrent.ScheduledExecutorService scheduledExecutorService;
private final java.util.concurrent.ScheduledFuture checkModifiedFuture;
private volatile long last;
public void <init>(org.apache.dubbo.common.URL)
{
java.util.concurrent.ScheduledFuture v;
org.apache.dubbo.remoting.p2p.support.FileGroup$1 v;
org.apache.dubbo.common.utils.NamedThreadFactory v;
java.io.File v;
java.util.concurrent.TimeUnit v;
org.apache.dubbo.common.URL v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
java.util.concurrent.ScheduledExecutorService v, v;
java.lang.String v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
v := @parameter: org.apache.dubbo.common.URL;
specialinvoke v.<org.apache.dubbo.remoting.p2p.support.AbstractGroup: void <init>(org.apache.dubbo.common.URL)>(v);
v = new org.apache.dubbo.common.utils.NamedThreadFactory;
specialinvoke v.<org.apache.dubbo.common.utils.NamedThreadFactory: void <init>(java.lang.String,boolean)>("FileGroupModifiedChecker", 1);
v = staticinvoke <java.util.concurrent.Executors: java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int,java.util.concurrent.ThreadFactory)>(3, v);
v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.util.concurrent.ScheduledExecutorService scheduledExecutorService> = v;
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.lang.String getAbsolutePath()>();
v = new java.io.File;
specialinvoke v.<java.io.File: void <init>(java.lang.String)>(v);
v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file> = v;
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.util.concurrent.ScheduledExecutorService scheduledExecutorService>;
v = new org.apache.dubbo.remoting.p2p.support.FileGroup$1;
specialinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup$1: void <init>(org.apache.dubbo.remoting.p2p.support.FileGroup)>(v);
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = interfaceinvoke v.<java.util.concurrent.ScheduledExecutorService: java.util.concurrent.ScheduledFuture scheduleWithFixedDelay(java.lang.Runnable,long,long,java.util.concurrent.TimeUnit)>(v, 2000L, 2000L, v);
v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.util.concurrent.ScheduledFuture checkModifiedFuture> = v;
return;
}
public void close()
{
java.lang.Throwable v;
java.util.concurrent.ScheduledFuture v;
org.apache.dubbo.common.logger.Logger v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
java.lang.String v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
specialinvoke v.<org.apache.dubbo.remoting.p2p.support.AbstractGroup: void close()>();
label:
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.util.concurrent.ScheduledFuture checkModifiedFuture>;
staticinvoke <org.apache.dubbo.common.utils.ExecutorUtil: void cancelScheduledFuture(java.util.concurrent.ScheduledFuture)>(v);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.dubbo.remoting.p2p.support.FileGroup: org.apache.dubbo.common.logger.Logger logger>;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
interfaceinvoke v.<org.apache.dubbo.common.logger.Logger: void error(java.lang.String,java.lang.Throwable)>(v, v);
label:
return;
catch java.lang.Throwable from label to label with label;
}
private void check() throws org.apache.dubbo.remoting.RemotingException
{
byte v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
long v, v;
java.io.File v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = virtualinvoke v.<java.io.File: long lastModified()>();
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: long last>;
v = v cmp v;
if v <= 0 goto label;
v.<org.apache.dubbo.remoting.p2p.support.FileGroup: long last> = v;
specialinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup: void changed()>();
label:
return;
}
private void changed() throws org.apache.dubbo.remoting.RemotingException
{
org.apache.dubbo.remoting.RemotingException v;
java.io.IOException v;
java.lang.String[] v;
java.net.InetSocketAddress v, v;
java.io.File v;
org.apache.dubbo.common.URL v, v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
int v, v;
java.lang.String v, v, v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
label:
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = staticinvoke <org.apache.dubbo.common.utils.IOUtils: java.lang.String[] readLines(java.io.File)>(v);
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = staticinvoke <org.apache.dubbo.common.URL: org.apache.dubbo.common.URL valueOf(java.lang.String)>(v);
virtualinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup: org.apache.dubbo.remoting.Client connect(org.apache.dubbo.common.URL)>(v);
v = v + 1;
goto label;
label:
v := @caughtexception;
v = new org.apache.dubbo.remoting.RemotingException;
v = new java.net.InetSocketAddress;
v = staticinvoke <org.apache.dubbo.common.utils.NetUtils: java.lang.String getLocalHost()>();
specialinvoke v.<java.net.InetSocketAddress: void <init>(java.lang.String,int)>(v, 0);
v = virtualinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup: org.apache.dubbo.common.URL getUrl()>();
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.net.InetSocketAddress toInetSocketAddress()>();
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
specialinvoke v.<org.apache.dubbo.remoting.RemotingException: void <init>(java.net.InetSocketAddress,java.net.InetSocketAddress,java.lang.String,java.lang.Throwable)>(v, v, v, v);
throw v;
label:
return;
catch java.io.IOException from label to label with label;
}
public org.apache.dubbo.remoting.p2p.Peer join(org.apache.dubbo.common.URL, org.apache.dubbo.remoting.ChannelHandler) throws org.apache.dubbo.remoting.RemotingException
{
org.apache.dubbo.remoting.ChannelHandler v;
org.apache.dubbo.remoting.RemotingException v;
java.lang.String[] v, v;
org.apache.dubbo.common.URL v, v;
int v, v;
java.lang.String v, v, v, v;
boolean v;
org.apache.dubbo.remoting.p2p.Peer v;
java.io.IOException v;
java.net.InetSocketAddress v, v;
java.io.File v, v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
v := @parameter: org.apache.dubbo.common.URL;
v := @parameter: org.apache.dubbo.remoting.ChannelHandler;
v = specialinvoke v.<org.apache.dubbo.remoting.p2p.support.AbstractGroup: org.apache.dubbo.remoting.p2p.Peer join(org.apache.dubbo.common.URL,org.apache.dubbo.remoting.ChannelHandler)>(v, v);
label:
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.lang.String toFullString()>();
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = staticinvoke <org.apache.dubbo.common.utils.IOUtils: java.lang.String[] readLines(java.io.File)>(v);
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
label:
return v;
label:
v = v + 1;
goto label;
label:
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = newarray (java.lang.String)[1];
v[0] = v;
staticinvoke <org.apache.dubbo.common.utils.IOUtils: void appendLines(java.io.File,java.lang.String[])>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = new org.apache.dubbo.remoting.RemotingException;
v = new java.net.InetSocketAddress;
v = staticinvoke <org.apache.dubbo.common.utils.NetUtils: java.lang.String getLocalHost()>();
specialinvoke v.<java.net.InetSocketAddress: void <init>(java.lang.String,int)>(v, 0);
v = virtualinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup: org.apache.dubbo.common.URL getUrl()>();
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.net.InetSocketAddress toInetSocketAddress()>();
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
specialinvoke v.<org.apache.dubbo.remoting.RemotingException: void <init>(java.net.InetSocketAddress,java.net.InetSocketAddress,java.lang.String,java.lang.Throwable)>(v, v, v, v);
throw v;
label:
return v;
catch java.io.IOException from label to label with label;
catch java.io.IOException from label to label with label;
}
public void leave(org.apache.dubbo.common.URL) throws org.apache.dubbo.remoting.RemotingException
{
org.apache.dubbo.remoting.RemotingException v;
java.lang.Object[] v;
java.lang.String[] v, v;
java.util.ArrayList v;
org.apache.dubbo.common.URL v, v;
int v, v;
java.lang.String v, v, v, v;
boolean v;
java.io.IOException v;
java.net.InetSocketAddress v, v;
java.io.File v, v;
org.apache.dubbo.remoting.p2p.support.FileGroup v;
v := @this: org.apache.dubbo.remoting.p2p.support.FileGroup;
v := @parameter: org.apache.dubbo.common.URL;
specialinvoke v.<org.apache.dubbo.remoting.p2p.support.AbstractGroup: void leave(org.apache.dubbo.common.URL)>(v);
label:
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.lang.String toFullString()>();
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = staticinvoke <org.apache.dubbo.common.utils.IOUtils: java.lang.String[] readLines(java.io.File)>(v);
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
label:
return;
label:
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
v = v + 1;
goto label;
label:
v = v.<org.apache.dubbo.remoting.p2p.support.FileGroup: java.io.File file>;
v = newarray (java.lang.String)[0];
v = interfaceinvoke v.<java.util.List: java.lang.Object[] toArray(java.lang.Object[])>(v);
staticinvoke <org.apache.dubbo.common.utils.IOUtils: void appendLines(java.io.File,java.lang.String[])>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = new org.apache.dubbo.remoting.RemotingException;
v = new java.net.InetSocketAddress;
v = staticinvoke <org.apache.dubbo.common.utils.NetUtils: java.lang.String getLocalHost()>();
specialinvoke v.<java.net.InetSocketAddress: void <init>(java.lang.String,int)>(v, 0);
v = virtualinvoke v.<org.apache.dubbo.remoting.p2p.support.FileGroup: org.apache.dubbo.common.URL getUrl()>();
v = virtualinvoke v.<org.apache.dubbo.common.URL: java.net.InetSocketAddress toInetSocketAddress()>();
v = virtualinvoke v.<java.io.IOException: java.lang.String getMessage()>();
specialinvoke v.<org.apache.dubbo.remoting.RemotingException: void <init>(java.net.InetSocketAddress,java.net.InetSocketAddress,java.lang.String,java.lang.Throwable)>(v, v, v, v);
throw v;
label:
return;
catch java.io.IOException from label to label with label;
catch java.io.IOException from label to label with label;
}
}