@@ -844,6 +844,57 @@ private URLFrontierGrpc() {}
844
844
return getListURLsMethod ;
845
845
}
846
846
847
+ private static volatile io .grpc .MethodDescriptor <
848
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ,
849
+ crawlercommons .urlfrontier .Urlfrontier .Long >
850
+ getCountURLsMethod ;
851
+
852
+ @ io .grpc .stub .annotations .RpcMethod (
853
+ fullMethodName = SERVICE_NAME + '/' + "CountURLs" ,
854
+ requestType = crawlercommons .urlfrontier .Urlfrontier .CountUrlParams .class ,
855
+ responseType = crawlercommons .urlfrontier .Urlfrontier .Long .class ,
856
+ methodType = io .grpc .MethodDescriptor .MethodType .UNARY )
857
+ public static io .grpc .MethodDescriptor <
858
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ,
859
+ crawlercommons .urlfrontier .Urlfrontier .Long >
860
+ getCountURLsMethod () {
861
+ io .grpc .MethodDescriptor <
862
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ,
863
+ crawlercommons .urlfrontier .Urlfrontier .Long >
864
+ getCountURLsMethod ;
865
+ if ((getCountURLsMethod = URLFrontierGrpc .getCountURLsMethod ) == null ) {
866
+ synchronized (URLFrontierGrpc .class ) {
867
+ if ((getCountURLsMethod = URLFrontierGrpc .getCountURLsMethod ) == null ) {
868
+ URLFrontierGrpc .getCountURLsMethod =
869
+ getCountURLsMethod =
870
+ io .grpc .MethodDescriptor
871
+ .<crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ,
872
+ crawlercommons .urlfrontier .Urlfrontier .Long >
873
+ newBuilder ()
874
+ .setType (io .grpc .MethodDescriptor .MethodType .UNARY )
875
+ .setFullMethodName (
876
+ generateFullMethodName (
877
+ SERVICE_NAME , "CountURLs" ))
878
+ .setSampledToLocalTracing (true )
879
+ .setRequestMarshaller (
880
+ io .grpc .protobuf .ProtoUtils .marshaller (
881
+ crawlercommons .urlfrontier .Urlfrontier
882
+ .CountUrlParams
883
+ .getDefaultInstance ()))
884
+ .setResponseMarshaller (
885
+ io .grpc .protobuf .ProtoUtils .marshaller (
886
+ crawlercommons .urlfrontier .Urlfrontier
887
+ .Long .getDefaultInstance ()))
888
+ .setSchemaDescriptor (
889
+ new URLFrontierMethodDescriptorSupplier (
890
+ "CountURLs" ))
891
+ .build ();
892
+ }
893
+ }
894
+ }
895
+ return getCountURLsMethod ;
896
+ }
897
+
847
898
/** Creates a new async stub that supports all call types for the service */
848
899
public static URLFrontierStub newStub (io .grpc .Channel channel ) {
849
900
io .grpc .stub .AbstractStub .StubFactory <URLFrontierStub > factory =
@@ -1137,6 +1188,15 @@ default void listURLs(
1137
1188
io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
1138
1189
getListURLsMethod (), responseObserver );
1139
1190
}
1191
+
1192
+ /** */
1193
+ default void countURLs (
1194
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams request ,
1195
+ io .grpc .stub .StreamObserver <crawlercommons .urlfrontier .Urlfrontier .Long >
1196
+ responseObserver ) {
1197
+ io .grpc .stub .ServerCalls .asyncUnimplementedUnaryCall (
1198
+ getCountURLsMethod (), responseObserver );
1199
+ }
1140
1200
}
1141
1201
1142
1202
/** Base class for the server implementation of the service URLFrontier. */
@@ -1439,6 +1499,17 @@ public void listURLs(
1439
1499
request ,
1440
1500
responseObserver );
1441
1501
}
1502
+
1503
+ /** */
1504
+ public void countURLs (
1505
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams request ,
1506
+ io .grpc .stub .StreamObserver <crawlercommons .urlfrontier .Urlfrontier .Long >
1507
+ responseObserver ) {
1508
+ io .grpc .stub .ClientCalls .asyncUnaryCall (
1509
+ getChannel ().newCall (getCountURLsMethod (), getCallOptions ()),
1510
+ request ,
1511
+ responseObserver );
1512
+ }
1442
1513
}
1443
1514
1444
1515
/** A stub to allow clients to do synchronous rpc calls to service URLFrontier. */
@@ -1658,6 +1729,13 @@ public java.util.Iterator<crawlercommons.urlfrontier.Urlfrontier.URLItem> listUR
1658
1729
return io .grpc .stub .ClientCalls .blockingServerStreamingCall (
1659
1730
getChannel (), getListURLsMethod (), getCallOptions (), request );
1660
1731
}
1732
+
1733
+ /** */
1734
+ public crawlercommons .urlfrontier .Urlfrontier .Long countURLs (
1735
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams request ) {
1736
+ return io .grpc .stub .ClientCalls .blockingUnaryCall (
1737
+ getChannel (), getCountURLsMethod (), getCallOptions (), request );
1738
+ }
1661
1739
}
1662
1740
1663
1741
/** A stub to allow clients to do ListenableFuture-style rpc calls to service URLFrontier. */
@@ -1862,6 +1940,14 @@ protected URLFrontierFutureStub build(
1862
1940
return io .grpc .stub .ClientCalls .futureUnaryCall (
1863
1941
getChannel ().newCall (getGetURLStatusMethod (), getCallOptions ()), request );
1864
1942
}
1943
+
1944
+ /** */
1945
+ public com .google .common .util .concurrent .ListenableFuture <
1946
+ crawlercommons .urlfrontier .Urlfrontier .Long >
1947
+ countURLs (crawlercommons .urlfrontier .Urlfrontier .CountUrlParams request ) {
1948
+ return io .grpc .stub .ClientCalls .futureUnaryCall (
1949
+ getChannel ().newCall (getCountURLsMethod (), getCallOptions ()), request );
1950
+ }
1865
1951
}
1866
1952
1867
1953
private static final int METHODID_LIST_NODES = 0 ;
@@ -1879,7 +1965,8 @@ protected URLFrontierFutureStub build(
1879
1965
private static final int METHODID_SET_CRAWL_LIMIT = 12 ;
1880
1966
private static final int METHODID_GET_URLSTATUS = 13 ;
1881
1967
private static final int METHODID_LIST_URLS = 14 ;
1882
- private static final int METHODID_PUT_URLS = 15 ;
1968
+ private static final int METHODID_COUNT_URLS = 15 ;
1969
+ private static final int METHODID_PUT_URLS = 16 ;
1883
1970
1884
1971
private static final class MethodHandlers <Req , Resp >
1885
1972
implements io .grpc .stub .ServerCalls .UnaryMethod <Req , Resp >,
@@ -2003,6 +2090,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
2003
2090
crawlercommons .urlfrontier .Urlfrontier .URLItem >)
2004
2091
responseObserver );
2005
2092
break ;
2093
+ case METHODID_COUNT_URLS :
2094
+ serviceImpl .countURLs (
2095
+ (crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ) request ,
2096
+ (io .grpc .stub .StreamObserver <
2097
+ crawlercommons .urlfrontier .Urlfrontier .Long >)
2098
+ responseObserver );
2099
+ break ;
2006
2100
default :
2007
2101
throw new AssertionError ();
2008
2102
}
@@ -2142,6 +2236,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
2142
2236
crawlercommons .urlfrontier .Urlfrontier .ListUrlParams ,
2143
2237
crawlercommons .urlfrontier .Urlfrontier .URLItem >(
2144
2238
service , METHODID_LIST_URLS )))
2239
+ .addMethod (
2240
+ getCountURLsMethod (),
2241
+ io .grpc .stub .ServerCalls .asyncUnaryCall (
2242
+ new MethodHandlers <
2243
+ crawlercommons .urlfrontier .Urlfrontier .CountUrlParams ,
2244
+ crawlercommons .urlfrontier .Urlfrontier .Long >(
2245
+ service , METHODID_COUNT_URLS )))
2145
2246
.build ();
2146
2247
}
2147
2248
@@ -2210,6 +2311,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
2210
2311
.addMethod (getSetCrawlLimitMethod ())
2211
2312
.addMethod (getGetURLStatusMethod ())
2212
2313
.addMethod (getListURLsMethod ())
2314
+ .addMethod (getCountURLsMethod ())
2213
2315
.build ();
2214
2316
}
2215
2317
}
0 commit comments