Helios.Util.InternalThreadLocalMap.SetIndexedVariable C# (CSharp) Method

SetIndexedVariable() public method

public SetIndexedVariable ( int index, object value ) : bool
index int
value object
return bool
        public bool SetIndexedVariable(int index, object value)
        {
            object[] lookup = this.indexedVariables;
            if (index < lookup.Length)
            {
                object oldValue = lookup[index];
                lookup[index] = value;
                return oldValue == Unset;
            }
            else
            {
                this.ExpandIndexedVariableTableAndSet(index, value);
                return true;
            }
        }

Usage Example

Ejemplo n.º 1
0
        protected static void AddToVariablesToRemove(InternalThreadLocalMap threadLocalMap, FastThreadLocal variable)
        {
            object v = threadLocalMap.GetIndexedVariable(VariablesToRemoveIndex);
            HashSet<FastThreadLocal> variablesToRemove;
            if (v == InternalThreadLocalMap.Unset || v == null)
            {
                variablesToRemove = new HashSet<FastThreadLocal>();
                    // Collections.newSetFromMap(new IdentityHashMap<FastThreadLocal<?>, Boolean>());
                threadLocalMap.SetIndexedVariable(VariablesToRemoveIndex, variablesToRemove);
            }
            else
            {
                variablesToRemove = (HashSet<FastThreadLocal>) v;
            }

            variablesToRemove.Add(variable);
        }
All Usage Examples Of Helios.Util.InternalThreadLocalMap::SetIndexedVariable