protected internal override bool addEntry(NetworkTableEntry nte)
 {
   lock (this)
   {
     NetworkTableEntry local_1 = (NetworkTableEntry) this.__\u003C\u003EnamedEntries.get((object) nte.__\u003C\u003Ename);
     if (local_1 != null)
     {
       if ((int) local_1.getId() != (int) nte.getId())
       {
         this.__\u003C\u003EidEntries.remove(local_1.getId());
         if ((int) nte.getId() != (int) ushort.MaxValue)
         {
           local_1.setId(nte.getId());
           this.__\u003C\u003EidEntries.put(nte.getId(), (object) local_1);
         }
       }
       local_1.forcePut(nte.getSequenceNumber(), nte.getType(), nte.getValue());
     }
     else
     {
       if ((int) nte.getId() != (int) ushort.MaxValue)
         this.__\u003C\u003EidEntries.put(nte.getId(), (object) nte);
       this.__\u003C\u003EnamedEntries.put((object) nte.__\u003C\u003Ename, (object) nte);
     }
   }
   return true;
 }
 public virtual void offerOutgoingUpdate(NetworkTableEntry nte)
 {
   if (nte.isDirty())
     return;
   nte.makeDirty();
   this.continuingReceiver.offerOutgoingUpdate(nte);
 }
 protected internal override bool updateEntry(NetworkTableEntry nte, char ch, object obj)
 {
   int num1 = (int) ch;
   ClientNetworkTableEntryStore networkTableEntryStore;
   Monitor.Enter((object) (networkTableEntryStore = this));
   int num2;
   // ISSUE: fault handler
   try
   {
     nte.forcePut((char) num1, obj);
     if ((int) nte.getId() == (int) ushort.MaxValue)
     {
       int num3 = 0;
       Monitor.Exit((object) networkTableEntryStore);
       return num3 != 0;
     }
     else
     {
       int num3 = 1;
       Monitor.Exit((object) networkTableEntryStore);
       num2 = num3;
     }
   }
   __fault
   {
     Monitor.Exit((object) networkTableEntryStore);
   }
   return num2 != 0;
 }
 public virtual void offerOutgoingUpdate(NetworkTableEntry nte)
 {
   lock (this.connectionsLock)
   {
     for (int local_1 = 0; local_1 < this.connections.size(); ++local_1)
       ((ServerConnectionAdapter) this.connections.get(local_1)).offerOutgoingUpdate(nte);
   }
 }
 public virtual void sendEntryAssignment(NetworkTableEntry nte)
 {
   lock (this.WRITE_LOCK)
   {
     this.sendMessageHeader(16);
     this.os.writeUTF(nte.__\u003C\u003Ename);
     this.os.writeByte((int) (sbyte) nte.getType().__\u003C\u003Eid);
     this.os.writeChar((int) nte.getId());
     this.os.writeChar((int) nte.getSequenceNumber());
     nte.sendValue(this.os);
   }
 }
Пример #6
0
 public virtual void putValue(NetworkTableEntry nte, object obj)
 {
   if (nte.getType() is ComplexEntryType)
   {
     lock (this.entryStore)
     {
       ComplexEntryType local_1 = (ComplexEntryType) nte.getType();
       this.entryStore.putOutgoing(nte, local_1.internalizeValue(nte.__\u003C\u003Ename, obj, nte.getValue()));
     }
   }
   else
     this.entryStore.putOutgoing(nte, obj);
 }
 public virtual void sendEntryUpdate(NetworkTableEntry nte)
 {
   lock (this.WRITE_LOCK)
   {
     this.sendMessageHeader(17);
     this.os.writeChar((int) nte.getId());
     this.os.writeChar((int) nte.getSequenceNumber());
     nte.sendValue(this.os);
   }
 }
    public virtual void offerOutgoingUpdate(NetworkTableEntry nte)
    {
      object obj;
      Exception exception1;
      IOException ioException1;
      try
      {
        Monitor.Enter(obj = this.connectionLock);
        try
        {
          if (this.connection != null && this.connectionState == ClientConnectionState.__\u003C\u003EIN_SYNC_WITH_SERVER)
            this.connection.sendEntryUpdate(nte);
          Monitor.Exit(obj);
          return;
        }
        catch (Exception ex)
        {
          int num = 0;
          exception1 = (Exception) ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num);
        }
      }
      catch (IOException ex)
      {
        int num = 1;
        ioException1 = (IOException) ByteCodeHelper.MapException<IOException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
        goto label_7;
      }
      Exception exception2 = exception1;
      IOException ioException2;
      try
      {
        Exception exception3 = exception2;
        Monitor.Exit(obj);
        throw Throwable.__\u003Cunmap\u003E(exception3);
      }
      catch (IOException ex)
      {
        int num = 1;
        ioException2 = (IOException) ByteCodeHelper.MapException<IOException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
      }
      IOException ioe = ioException2;
      goto label_11;
label_7:
      ioe = ioException1;
label_11:
      this.ioException(ioe);
    }
 public virtual void offerIncomingUpdate(NetworkTableEntry nte, char ch, object obj)
 {
   int num = (int) ch;
   this.entryStore.offerIncomingUpdate(nte, (char) num, obj);
 }
 public virtual void offerIncomingAssignment(NetworkTableEntry nte)
 {
   this.entryStore.offerIncomingAssignment(nte);
 }
 public virtual void offerOutgoingUpdate(NetworkTableEntry nte)
 {
   IOException ioe;
   try
   {
     if (this.connectionState != ServerConnectionState.__\u003C\u003ECONNECTED_TO_CLIENT)
       return;
     this.__\u003C\u003Econnection.sendEntryUpdate(nte);
     return;
   }
   catch (IOException ex)
   {
     int num = 1;
     ioe = (IOException) ByteCodeHelper.MapException<IOException>((Exception) ex, (ByteCodeHelper.MapFlags) num);
   }
   this.ioException(ioe);
 }
 public virtual void offerIncomingUpdate(NetworkTableEntry nte, char ch, object obj)
 {
   int num = (int) ch;
   this.transactionReceiver.offerIncomingUpdate(nte, (char) num, obj);
 }
 public virtual void offerIncomingAssignment(NetworkTableEntry nte)
 {
   this.transactionReceiver.offerIncomingAssignment(nte);
 }
Пример #14
0
    public virtual void offerOutgoingUpdate(NetworkTableEntry nte)
    {
      object obj;
      Monitor.Enter(obj = this.transactionsLock);
      // ISSUE: fault handler
      try
      {
        this.incomingUpdateQueue.queue((object) nte);
        if (this.incomingUpdateQueue.isFull())
        {
          try
          {
            this.run();
            goto label_6;
          }
          catch (InterruptedException ex)
          {
          }
        }
        else
          goto label_8;
      }
      __fault
      {
        Monitor.Exit(obj);
      }
label_6:
      // ISSUE: fault handler
      try
      {
        System.get_err().println("update queue overflowed. decrease the rate at which you update entries or increase the write buffer size");
      }
      __fault
      {
        Monitor.Exit(obj);
      }
label_8:
      // ISSUE: fault handler
      try
      {
        Monitor.Exit(obj);
      }
      __fault
      {
        Monitor.Exit(obj);
      }
    }