コード例 #1
0
ファイル: RawIteratorTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldCreateSimpleRawIterator()
        internal virtual void ShouldCreateSimpleRawIterator()
        {
            assertEquals(Collections.emptyList(), List(RawIterator.of()));
            assertEquals(Collections.singletonList(1), List(RawIterator.of(1)));
            assertEquals(asList(1, 2), List(RawIterator.of(1, 2)));
            assertEquals(asList(1, 2, 3), List(RawIterator.of(1, 2, 3)));
        }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.collection.RawIterator<Object[],org.neo4j.internal.kernel.api.exceptions.ProcedureException> apply(org.neo4j.kernel.api.proc.Context ctx, Object[] input, org.neo4j.kernel.api.ResourceTracker resourceTracker) throws org.neo4j.internal.kernel.api.exceptions.ProcedureException
        public override RawIterator <object[], ProcedureException> Apply(Context ctx, object[] input, ResourceTracker resourceTracker)
        {
            IDictionary <string, IList <Endpoint> > routersPerDb = RouteEndpoints();
            MultiClusterRoutingResult result = new MultiClusterRoutingResult(routersPerDb, _timeToLiveMillis);

            return(RawIterator.of <object[], ProcedureException>(MultiClusterRoutingResultFormat.Build(result)));
        }
コード例 #3
0
        public override RawIterator <object[], ProcedureException> Apply(Context ctx, object[] input, ResourceTracker resourceTracker)
        {
            IList <Endpoint> routeEndpoints = routeEndpoints();
            IList <Endpoint> writeEndpoints = writeEndpoints();
            IList <Endpoint> readEndpoints  = readEndpoints();

            return(RawIterator.of <object[], ProcedureException>(ResultFormatV1.Build(new LoadBalancingResult(routeEndpoints, writeEndpoints, readEndpoints, _config.get(CausalClusteringSettings.cluster_routing_ttl).toMillis()))));
        }
コード例 #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.collection.RawIterator<Object[],org.neo4j.internal.kernel.api.exceptions.ProcedureException> apply(org.neo4j.kernel.api.proc.Context ctx, Object[] input, org.neo4j.kernel.api.ResourceTracker resourceTracker) throws org.neo4j.internal.kernel.api.exceptions.ProcedureException
        public override RawIterator <object[], ProcedureException> Apply(Context ctx, object[] input, ResourceTracker resourceTracker)
        {
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") String dbName = (String) input[0];
            string           dbName  = ( string )input[0];
            IList <Endpoint> routers = RouteEndpoints(dbName);

            Dictionary <string, IList <Endpoint> > routerMap = new Dictionary <string, IList <Endpoint> >();

            routerMap[dbName] = routers;

            MultiClusterRoutingResult result = new MultiClusterRoutingResult(routerMap, _timeToLiveMillis);

            return(RawIterator.of <object[], ProcedureException>(MultiClusterRoutingResultFormat.Build(result)));
        }
コード例 #5
0
 public override RawIterator <object[], ProcedureException> Apply(Context ctx, object[] input, ResourceTracker resourceTracker)
 {
     return(RawIterator.of <object[], ProcedureException>(new object[] { Role().name() }));
 }
コード例 #6
0
 public override RawIterator <object[], ProcedureException> apply(Context ctx, object[] input, ResourceTracker resourceTracker)
 {
     return(RawIterator.of <object[], ProcedureException>(input));
 }
コード例 #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.collection.RawIterator<Object[],org.neo4j.internal.kernel.api.exceptions.ProcedureException> apply(org.neo4j.kernel.api.proc.Context ctx, Object[] input, org.neo4j.kernel.api.ResourceTracker resourceTracker) throws org.neo4j.internal.kernel.api.exceptions.ProcedureException
            public override RawIterator <object[], ProcedureException> apply(Context ctx, object[] input, ResourceTracker resourceTracker)
            {
                return(RawIterator.of <object[], ProcedureException>(new object[] { ctx.Get(Org.Neo4j.Kernel.api.proc.Context_Fields.KernelTransaction).dataRead() }));
            }
コード例 #8
0
ファイル: ProceduresTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.collection.RawIterator<Object[], org.neo4j.internal.kernel.api.exceptions.ProcedureException> apply(org.neo4j.kernel.api.proc.Context ctx, Object[] input, org.neo4j.kernel.api.ResourceTracker resourceTracker) throws org.neo4j.internal.kernel.api.exceptions.ProcedureException
            public override RawIterator <object[], ProcedureException> apply(Context ctx, object[] input, ResourceTracker resourceTracker)
            {
                return(RawIterator.of <object[], ProcedureException>(new object[] { ctx.Get(_someKey) }));
            }