Package org.apache.jcs.auxiliary.lateral.socket.tcp.behavior

Examples of org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes


     * @see org.apache.jcs.auxiliary.AuxiliaryCacheFactory#createCache(org.apache.jcs.auxiliary.AuxiliaryCacheAttributes,
     *      org.apache.jcs.engine.behavior.ICompositeCacheManager)
     */
    public AuxiliaryCache createCache( AuxiliaryCacheAttributes iaca, ICompositeCacheManager cacheMgr )
    {
        ITCPLateralCacheAttributes lac = (ITCPLateralCacheAttributes) iaca;
        ArrayList noWaits = new ArrayList();

        // pars up the tcp servers and set the tcpServer value and
        // get the manager and then get the cache
        // no servers are required.
        if ( lac.getTcpServers() != null )
        {
            StringTokenizer it = new StringTokenizer( lac.getTcpServers(), "," );
            if ( log.isDebugEnabled() )
            {
                log.debug( "Configured for [" + it.countTokens() + "]  servers." );
            }
            while ( it.hasMoreElements() )
            {
                String server = (String) it.nextElement();
                if ( log.isDebugEnabled() )
                {
                    log.debug( "tcp server = " + server );
                }
                ITCPLateralCacheAttributes lacC = (ITCPLateralCacheAttributes) lac.copy();
                lacC.setTcpServer( server );
                LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lacC, cacheMgr );
                ICache ic = lcm.getCache( lacC.getCacheName() );
                if ( ic != null )
                {
                    noWaits.add( ic );
                }
                else
View Full Code Here


     * @see org.apache.jcs.auxiliary.lateral.LateralCacheAbstractFactory#createListener(org.apache.jcs.auxiliary.lateral.LateralCacheAttributes,
     *      org.apache.jcs.engine.behavior.ICompositeCacheManager)
     */
    public void createListener( ILateralCacheAttributes lac, ICompositeCacheManager cacheMgr )
    {
        ITCPLateralCacheAttributes attr = (ITCPLateralCacheAttributes) lac;
        // don't create a listener if we are not receiving.
        if ( attr.isReceive() )
        {
            if ( log.isInfoEnabled() )
            {
                log.info( "Creating listener for " + lac );
            }
View Full Code Here

                try
                {
                    // get a cache and add it to the no waits
                    // the add method should not add the same.
                    // we need the listener port from the original config.
                    ITCPLateralCacheAttributes lca = null;
                    if ( service.getTcpLateralCacheAttributes() != null )
                    {
                        lca = (ITCPLateralCacheAttributes) service.getTcpLateralCacheAttributes().copy();
                    }
                    else
                    {
                        lca = new TCPLateralCacheAttributes();
                    }
                    lca.setTransmissionType( LateralCacheAttributes.TCP );
                    lca.setTcpServer( message.getHost() + ":" + message.getPort() );
                    LateralTCPCacheManager lcm = LateralTCPCacheManager.getInstance( lca, cacheMgr );

                    ArrayList regions = message.getCacheNames();
                    if ( regions != null )
                    {
View Full Code Here

TOP

Related Classes of org.apache.jcs.auxiliary.lateral.socket.tcp.behavior.ITCPLateralCacheAttributes

Copyright © 2018 www.massapicom. 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.