Examples of IdentityHashSet


Examples of org.apache.mina.util.IdentityHashSet

        }

        private MessageEncoder findEncoder(Class type) {
            MessageEncoder encoder = (MessageEncoder) encoders.get(type);
            if (encoder == null) {
                encoder = findEncoder(type, new IdentityHashSet());
            }

            return encoder;
        }
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

    public Set getManagedSessions(SocketAddress serviceAddress) {
        Set sessions;
        synchronized (managedSessions) {
            sessions = (Set) managedSessions.get(serviceAddress);
            if (sessions == null) {
                sessions = new IdentityHashSet();
            }
        }

        synchronized (sessions) {
            return new IdentityHashSet(sessions);
        }
    }
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

        boolean firstSession = false;
        Set sessions;
        synchronized (managedSessions) {
            sessions = (Set) managedSessions.get(serviceAddress);
            if (sessions == null) {
                sessions = new IdentityHashSet();
                managedSessions.put(serviceAddress, sessions);
                firstSession = true;
            }

            // If already registered, ignore.
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

        final Object lock = new Object();
        Set sessionsCopy;

        // Create a copy to avoid ConcurrentModificationException
        synchronized (sessions) {
            sessionsCopy = new IdentityHashSet(sessions);
        }

        for (Iterator i = sessionsCopy.iterator(); i.hasNext();) {
            ((IoSession) i.next()).close().addListener(new IoFutureListener() {
                public void operationComplete(IoFuture future) {
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

            /*
             * No immediate match could be found. Search the type's interfaces.
             */
           
            if( triedClasses == null )
                triedClasses = new IdentityHashSet();
            triedClasses.add( type );
           
            Class[] interfaces = type.getInterfaces();
            for( int i = 0; i < interfaces.length; i ++ )
            {
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

        private MessageEncoder findEncoder( Class type )
        {
            MessageEncoder encoder = ( MessageEncoder ) encoders.get( type );
            if( encoder == null )
            {
                encoder = findEncoder( type, new IdentityHashSet() );
            }

            return encoder;
        }
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

    public Set getManagedSessions(SocketAddress serviceAddress) {
        Set sessions;
        synchronized (managedSessions) {
            sessions = (Set) managedSessions.get(serviceAddress);
            if (sessions == null) {
                sessions = new IdentityHashSet();
            }
        }

        synchronized (sessions) {
            return new IdentityHashSet(sessions);
        }
    }
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

        boolean firstSession = false;
        Set sessions;
        synchronized (managedSessions) {
            sessions = (Set) managedSessions.get(serviceAddress);
            if (sessions == null) {
                sessions = new IdentityHashSet();
                managedSessions.put(serviceAddress, sessions);
                firstSession = true;
            }
        }
View Full Code Here

Examples of org.apache.mina.util.IdentityHashSet

        final Object lock = new Object();
        Set sessionsCopy;

        // Create a copy to avoid ConcurrentModificationException
        synchronized (sessions) {
            sessionsCopy = new IdentityHashSet(sessions);
        }

        for (Iterator i = sessionsCopy.iterator(); i.hasNext();) {
            ((IoSession) i.next()).close().addListener(new IoFutureListener() {
                public void operationComplete(IoFuture future) {
View Full Code Here

Examples of org.eclipse.persistence.internal.helper.IdentityHashSet

        if (this.discoverUnregisteredNewObjectsWithoutPersist){
            super.discoverUnregisteredNewObjects(clones, newObjects, unregisteredExistingObjects, visitedObjects);
        }else{
            //Bug#438193 : Replace HashSet with IdentityHashSet below for cascadePersistErrors so that the comparison will be by reference and
            //not by equals() which invokes hashCode()
            Set<Object> cascadePersistErrors = new IdentityHashSet();
            for (Iterator clonesEnum = clones.keySet().iterator(); clonesEnum.hasNext(); ) {       
                discoverAndPersistUnregisteredNewObjects(clonesEnum.next(), false, newObjects, unregisteredExistingObjects, visitedObjects, cascadePersistErrors);
            }
            // EL Bug 343925 - Throw IllegalStateException with all unregistered objects which
            // are not marked with CascadeType.PERSIST after iterating through all mappings.
            if (!cascadePersistErrors.isEmpty()) {
                throw new IllegalStateException(ExceptionLocalization.buildMessage("new_object_found_during_commit", cascadePersistErrors.toArray()));
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.