You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Saadat Dowlati <SD...@manh.com> on 2008/02/06 20:20:37 UTC

How to get TCPLateralCacheAttributes

Hello,

I have the following cache configuration. I need to get TcpListenerPort
& other lateral cache attributes pragmatically. I have tried different
APIs, but none has worked so far. I appreciate your help with this. I'm
using JCS 1.2.7.

 

### PRE-DEFINED CACHE REGION

jcs.region.userLoginCache=LTCP

jcs.region.userLoginCache.cacheattributes=org.apache.jcs.engine.Composit
eCacheAttributes

jcs.region.userLoginCache.cacheattributes.MaxObjects=10000

jcs.region.userLoginCache.cacheattributes.MemoryCacheName=org.apache.jcs
.engine.memory.lru.LRUMemoryCache

jcs.region.userLoginCache.cacheattributes.UseMemoryShrinker=true

jcs.region.userLoginCache.cacheattributes.MaxMemoryIdleTimeSeconds=1200

jcs.region.userLoginCache.cacheattributes.ShrinkerIntervalSeconds=1830

jcs.region.userLoginCache.elementattributes=org.apache.jcs.engine.Elemen
tAttributes

jcs.region.userLoginCache.elementattributes.IsEternal=false

jcs.region.userLoginCache.elementattributes.MaxLifeSeconds=600

jcs.region.userLoginCache.elementattributes.IdleTime=1200

jcs.region.userLoginCache.elementattributes.IsSpool=false

 

### Discovery: manual [point-to-point]

jcs.auxiliary.LTCP=org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTC
PCacheFactory

jcs.auxiliary.LTCP.attributes=org.apache.jcs.auxiliary.lateral.socket.tc
p.TCPLateralCacheAttributes

jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP

jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111

jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110

jcs.auxiliary.LTCP.attributes.PutOnlyMode=false

--

Thanks,

sd


Re: How to get TCPLateralCacheAttributes

Posted by Aaron Smuts <as...@yahoo.com>.
You can set them programmatically by modifying the
values in the properties object and then initializing
the cache using that properties object.  The cache is
not setup to expose them.  You could, of course,
simply read the cache.ccf file. . . .  If you are
using UDP discovery, then, well, you could also get
the auxiliary from the composite cache manager, get
its attributes, and cast.  But that's ugly.  But I
can't imagine that what you are trying to do is very
pretty.

Aaron


--- Saadat Dowlati <SD...@manh.com> wrote:

> Hello,
> 
> I have the following cache configuration. I need to
> get TcpListenerPort
> & other lateral cache attributes pragmatically. I
> have tried different
> APIs, but none has worked so far. I appreciate your
> help with this. I'm
> using JCS 1.2.7.
> 
>  
> 
> ### PRE-DEFINED CACHE REGION
> 
> jcs.region.userLoginCache=LTCP
> 
>
jcs.region.userLoginCache.cacheattributes=org.apache.jcs.engine.Composit
> eCacheAttributes
> 
>
jcs.region.userLoginCache.cacheattributes.MaxObjects=10000
> 
>
jcs.region.userLoginCache.cacheattributes.MemoryCacheName=org.apache.jcs
> .engine.memory.lru.LRUMemoryCache
> 
>
jcs.region.userLoginCache.cacheattributes.UseMemoryShrinker=true
> 
>
jcs.region.userLoginCache.cacheattributes.MaxMemoryIdleTimeSeconds=1200
> 
>
jcs.region.userLoginCache.cacheattributes.ShrinkerIntervalSeconds=1830
> 
>
jcs.region.userLoginCache.elementattributes=org.apache.jcs.engine.Elemen
> tAttributes
> 
>
jcs.region.userLoginCache.elementattributes.IsEternal=false
> 
>
jcs.region.userLoginCache.elementattributes.MaxLifeSeconds=600
> 
>
jcs.region.userLoginCache.elementattributes.IdleTime=1200
> 
>
jcs.region.userLoginCache.elementattributes.IsSpool=false
> 
>  
> 
> ### Discovery: manual [point-to-point]
> 
>
jcs.auxiliary.LTCP=org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTC
> PCacheFactory
> 
>
jcs.auxiliary.LTCP.attributes=org.apache.jcs.auxiliary.lateral.socket.tc
> p.TCPLateralCacheAttributes
> 
>
jcs.auxiliary.LTCP.attributes.TransmissionTypeName=TCP
> 
>
jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111
> 
> jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110
> 
> jcs.auxiliary.LTCP.attributes.PutOnlyMode=false
> 
> --
> 
> Thanks,
> 
> sd
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org