Example #1
0
 private void AddHexValue(sbyte value)
 {
     if (_bytesOnThisLine == 1)
     {
         // it is the first byte
         // out.append( NOTHING )
     }
     else if (_bytesOnThisLine % _bytesPerGroup == 1)
     {
         // it is the first byte for a new byte group
         @out.append(_groupSeparator);
     }
     else
     {
         @out.append(_byteSeparator);
     }
     @out.printf("%X%X", 0xF & (value >> 4), 0xF & value);
 }
Example #2
0
 public virtual void Print(PrintStream @out)
 {
     @out.println("Plan: [thread; action]");
     for (int i = 0; i < _plan.Length; i++)
     {
         long threadId = _executedByThread[i];
         @out.printf("  % 3d : %s%n", threadId, _plan[i]);
         if (threadId == -1)
         {
             break;
         }
     }
 }
 public override void PercentChanged(int percent)
 {
     for (int i = _lastPercentage + 1; i <= percent; i++)
     {
         @out.print('.');
         if (i % 20 == 0)
         {
             @out.printf(" %3d%%%n", i);
         }
     }
     _lastPercentage = percent;
     @out.flush();
 }
Example #4
0
        private void PrintSampleTree(PrintStream @out, double total, PriorityQueue <Sample> children, int indent)
        {
            Sample child;

            while ((child = children.poll()) != null)
            {
                for (int i = 0; i < indent; i++)
                {
                    @out.print(' ');
                }
                @out.printf("%.2f%%: %s%n", child.get() / total * 100.0, child.StackTraceElement);
                PrintSampleTree(@out, total, child.OrderedChildren, indent + 2);
            }
        }
Example #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void print(java.io.PrintStream out) throws java.io.IOException
        public virtual void Print(PrintStream @out)
        {
            @out.println(string.Format("{0,8} {1,5}  {2,2} {3}", "Index", "Term", "C?", "Content"));
            long index = 0L;

            using (RaftLogCursor cursor = _raftLog.getEntryCursor(0))
            {
                while (cursor.Next())
                {
                    RaftLogEntry raftLogEntry = cursor.get();
                    @out.printf("%8d %5d %s", index, raftLogEntry.Term(), raftLogEntry.Content());
                    index++;
                }
            }
        }
Example #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void checkDbState(org.neo4j.io.layout.DatabaseLayout databaseLayout, org.neo4j.kernel.configuration.Config tuningConfiguration) throws ToolFailureException
        private void CheckDbState(DatabaseLayout databaseLayout, Config tuningConfiguration)
        {
            try
            {
                using (JobScheduler jobScheduler = createInitialisedScheduler(), PageCache pageCache = ConfigurableStandalonePageCacheFactory.createPageCache(_fs, tuningConfiguration, jobScheduler))
                {
                    assertRecoveryIsNotRequired(_fs, pageCache, tuningConfiguration, databaseLayout, new Monitors());
                }
            }
            catch (RecoveryRequiredException rre)
            {
                throw new ToolFailureException(rre.Message);
            }
            catch (Exception e)
            {
                _systemError.printf("Failure when checking for recovery state: '%s', continuing as normal.%n", e);
            }
        }
 public override void MayExceedNodeIdCapacity(long capacity, long estimatedCount)
 {
     _err.printf("WARNING: estimated number of relationships %d may exceed capacity %d of selected record format%n", estimatedCount, capacity);
 }
Example #8
0
 public override void ReportInconsistentTxIdSequence(long lastSeenTxId, long currentTxId)
 {
     @out.printf("Inconsistent in tx id sequence between transactions %d and %d %n", lastSeenTxId, currentTxId);
     IncrementAndPerhapsThrow();
 }
Example #9
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public void log(@Nonnull String message, @Nonnull Throwable throwable)
        public override void Log(string message, Exception throwable)
        {
            _printStream.printf("%s, cause: %s%n", message, throwable);
        }