isImmutable() public abstract method

public abstract isImmutable ( ) : bool
return bool
Example #1
0
File: Log.cs Project: nomit007/f4
        public static void addHandler(Func func)
        {
            if (!func.isImmutable())
            throw NotImmutableErr.make("handler must be immutable").val;

              lock (lockObj)
              {
            List temp = new List(Sys.FuncType, m_handlers).add(func);
            m_handlers = (Func[])temp.toArray(new Func[temp.sz()]);
              }
        }
Example #2
0
        public static void addHandler(Func func)
        {
            if (!func.isImmutable())
            {
                throw NotImmutableErr.make("handler must be immutable").val;
            }

            lock (lockObj)
            {
                List temp = new List(Sys.FuncType, m_handlers).add(func);
                m_handlers = (Func[])temp.toArray(new Func[temp.sz()]);
            }
        }
Example #3
0
        public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c, Func r)
        {
            if (k != null && !k.isImmutable())
            {
                throw NotImmutableErr.make("Coalescing toKey func not immutable: " + k).val;
            }

            if (c != null && !c.isImmutable())
            {
                throw NotImmutableErr.make("Coalescing coalesce func not immutable: " + c).val;
            }

            make_(self, pool, r);
            self.m_queue = new CoalescingQueue(k, c);
        }
Example #4
0
        public static void make_(Actor self, ActorPool pool, Func receive)
        {
            // check pool
            if (pool == null)
            {
                throw NullErr.make("pool is null").val;
            }

            // check receive method
            if (receive == null && self.@typeof().qname() == "concurrent::Actor")
            {
                throw ArgErr.make("must supply receive func or subclass Actor").val;
            }
            if (receive != null && !receive.isImmutable())
            {
                throw NotImmutableErr.make("Receive func not immutable: " + receive).val;
            }

            // init
            self.m_pool    = pool;
            self.m_receive = receive;
            self.m_queue   = new Queue();
        }
Example #5
0
File: Actor.cs Project: nomit007/f4
        public static void makeCoalescing_(Actor self, ActorPool pool, Func k, Func c, Func r)
        {
            if (k != null && !k.isImmutable())
            throw NotImmutableErr.make("Coalescing toKey func not immutable: " + k).val;

              if (c != null && !c.isImmutable())
            throw NotImmutableErr.make("Coalescing coalesce func not immutable: " + c).val;

              make_(self, pool, r);
              self.m_queue = new CoalescingQueue(k, c);
        }
Example #6
0
File: Actor.cs Project: nomit007/f4
        public static void make_(Actor self, ActorPool pool, Func receive)
        {
            // check pool
              if (pool == null)
            throw NullErr.make("pool is null").val;

              // check receive method
              if (receive == null && self.@typeof().qname() == "concurrent::Actor")
            throw ArgErr.make("must supply receive func or subclass Actor").val;
              if (receive != null && !receive.isImmutable())
            throw NotImmutableErr.make("Receive func not immutable: " + receive).val;

              // init
              self.m_pool = pool;
              self.m_receive = receive;
              self.m_queue = new Queue();
        }