Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public void log(@Nonnull String message)
            public void log(string message)
            {
                lock (_outerInstance.@lock)
                {
                    _slf4jLogger.error(message);
                }
            }
Пример #2
0
 private CollectionCache.CollectionInfo getInfo(long id)
 {
     System.Collections.Generic.IDictionary <long, CollectionInfo
                                             > dbCache = this.cache[this.db];
     if (dbCache == null)
     {
         dbCache = new System.Collections.Generic.Dictionary <long, CollectionInfo
                                                              >();
         this.cache[this.db] = dbCache;
     }
     CollectionCache.CollectionInfo info = dbCache[id];
     if (info == null || this.isExpired(info.time))
     {
         try
         {
             string name = this.execute(id);
             info = new CollectionCache.CollectionInfo(name, new System.DateTime
                                                           ().getTime());
             dbCache[id] = info;
         }
         catch (ArangoDBException e)
         {
             LOGGER.error(e.Message, e);
         }
     }
     return(info);
 }
Пример #3
0
 protected internal virtual void connect(Connection
                                         connection)
 {
     if (!connection.isOpen())
     {
         try
         {
             connection.open();
             if (this.user != null)
             {
                 this.authenticate();
             }
         }
         catch (System.IO.IOException e)
         {
             LOGGER.error(e.Message, e);
             throw new ArangoDBException(e);
         }
     }
 }