Exemple #1
0
        public virtual void Put(long key, object o)
        {
            int tkey = (int)key % size;

            NeoDatis.Odb.Test.Nativemap.Entry[] entries = null;
            if (array[tkey] == null)
            {
                entries     = new NeoDatis.Odb.Test.Nativemap.Entry[secondSize];
                entries[0]  = new NeoDatis.Odb.Test.Nativemap.Entry(key, o);
                array[tkey] = entries;
                return;
            }
            int i = 0;

            while (i < entries.Length)
            {
                if (entries[i] == null)
                {
                    entries[i] = new NeoDatis.Odb.Test.Nativemap.Entry(key, o);
                    return;
                }
                i++;
            }
            throw new System.Exception("Second array explosion");
        }
Exemple #2
0
		public virtual void Put(long key, object o)
		{
			int tkey = (int)key % size;
			NeoDatis.Odb.Test.Nativemap.Entry[] entries = null;
			if (array[tkey] == null)
			{
				entries = new NeoDatis.Odb.Test.Nativemap.Entry[secondSize];
				entries[0] = new NeoDatis.Odb.Test.Nativemap.Entry(key, o);
				array[tkey] = entries;
				return;
			}
			int i = 0;
			while (i < entries.Length)
			{
				if (entries[i] == null)
				{
					entries[i] = new NeoDatis.Odb.Test.Nativemap.Entry(key, o);
					return;
				}
				i++;
			}
			throw new System.Exception("Second array explosion");
		}