How to set the expiration time for a namedcache programmatically?

I have a named cache with near cache configuration and no expiration specified in the cache-config. The backing map which is a distributed scheme has a size limited eviction policy but no expiration. I have an algorithm to determine the expiry delay of this named cache at run time. How can I set this delay programmatically on the named cache?
Thanks
Sairam

Hi Sairam,
You would need to get the backing map for the cache and then set the expiry on the backing map; assuming that the backing map supports expiry.
For example:
NamedCache cache = CacheFactory.getCache("test");
CacheService service = cache.getCacheService();
DefaultConfigurableCacheFactory.Manager bmm = (DefaultConfigurableCacheFactory.Manager) service.getBackingMapManager();
Map bm = bmm.getBackingMap("test");
if (bm instanceof ConfigurableCacheMap)
System.out.println("Setting expiry delay");
((ConfigurableCacheMap) bm).setExpiryDelay(100000);
-John

Similar Messages

  • How to set the Expiration Date for a task which is been assigned explictly.

    Hi,
    When I assign a task to myself and not work on it for couple of weeks the task is getting released automatically into the original unassigned pool. The TaskActionHandler WSDL is causing that to happen. I don't want a task to be automatically released into the pool when I don't work on it for couple of weeks, how can I make that happen? TaskActionHandler is something which comes with the BPEL so I can't change the way how it behaves. Do I need to set the expiration date or duration explicitly when a task is created?then how do I do that?
    If anybody could let me know how to make TaskActionHandler not to release a dehydrated task, I would be glad.
    Thanks,
    Mythili.

    Hi,
    Make AUTO RELEASE a restricted action for the task by adding the following line:
    <restrictedAction>AUTO RELEASE</restrictedAction>
    to the <restrictedActions> tag in the task configuration file.
    Works effectively.
    Alternatively, you can specifiy the auto release durations on a per task priority basis. There is more on that in the BPEL Dev Guide.
    Hth, Sjoerd

  • Does anyone know how to set the starting time for an audio book?

    I am trying to restart a burn in iTunes that failed for an audiobook. I need to set the start time so it will not have to reburn the disks that were already completed. I cannot find out how to do that in version 11 if the book consists of more than one file. Anyone have an idea how to do this? Apple wants me to pay $20 for something that should be in the help menu.

    UCCX 5.0(2)SR02 is the version
    I attached a screenshot of what I am trying to use but I am not sure what to put as the value?  I tried using "now" and "null" but no success.

  • How do I set the default time for calendar alerts?

    How do I set the default time for calendar alerts? I always want to have an alert 15 minutes before my appointments. I don't want to have to manually set it each time I make an appointment (I just moved to iphone from a windows mobile where this was basic stuff so I apologise if this is a noob question).

    I have the same issue. I've searched these forums and found lots of people who have asked this same question, but nobody who has received an answer.
    About a year ago, I migrated from a Windows PC and a Blackberry (both of which had very simple default alert options) to a MacBook Pro and an iPhone and have yet to find a solution on this forum or from any of my Apple-savvy friends. Very discouraging.

  • How to increase the waiting time for response in Adapter Engine not in IE

    Hi Experts,
                It is a SOAP to Proxy Synchronous interface. SOAP system is sending the request to PI, PI sending the same request to ECC system, After execution of some logic response back to PI in 7 minutes. In ABAP Stack(sxmb_moni) processing the response message also successfully with success flag after completion of these 7 minutes. But exactly 5 minutes later getting the error at Java Stack RWB- in communication channel monitoring i.e
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessageExpiredException: Message bd2bf8d0-b2c2-11e0-c383-001cc4fb5cb7(OUTBOUND) expired.  We have set the "runtime-HTTP_TIMEOUT" parameter as 3600. thats why in Integration engine it is processing successfully.
    kindly suggest me how to increase the waiting time for response in Adapter Engine. Exactly after 5 mins getting the above error in rwb, but in Integration Engine getting successful flag after 7 mins until then it is waiting for response with  status flag Log version.
    Thanks & Regards,
    Srihari.

    Hi,
    Please see
    How To... Investigate Timeouts In Synchronous XI/PI Scenarios
    It will answer all your queries
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c059d583-a551-2c10-e095-eb5d95e03747?QuickLink=index&overridelayout=true

  • "I would like to know how to set the default view for the columns. Somewhere I read it could be done in by music icon under Library.  Can't find it.  Thanks

    "I would like to know how to set the default view for the columns that are shown in iTunes. Every time I open it, I have to either go to the options, or right-click to get the pop-up options, and delete "rating" and add "composer." I'd really like to just do it once and be done with it."  Somewhere I read you could do this by clicking on the Music icon under LIBRARY then arramge the columns.  Trouble is, I can't find a Musi Folder or icon in my user library.
    Any help would be appreiated.  OSX 10.9.2  iTunes version 11.1.5  Thanks!!! CW!

    From the iTunes menu bar try View>Show View Options.  Make sure what you want to see is checked and what you don't is unchecked.  You can do this (may need to do this) for any playlists, your main Library, etc.
    Good luck
    srb

  • How to set the interval time in the   JFormattedTextField? Pls Contribute..

    Hi Frienz,
    Hi have a following code in which i want set the interval time for the TextField by 15 min
    So how it is possible please tell me out.
    DateFormatter frmtr = new DateFormatter();
                   SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
                   frmtr.setFormat(sdf);
                   frmtr.setAllowsInvalid(false);
                   DefaultFormatterFactory factory = new DefaultFormatterFactory(frmtr, frmtr, frmtr);
                   fmtToTime.setFormatterFactory(factory);

    AFAIK there is no easy (pure java) way: either you exec something (depending on your paltform) or use native code. Appropriate privileges will be necessary.

  • How to set cookie expire time

    Hi I'm new to jsp,
    please tell anybody, how to set cookie expire time.
    I know about setMaxAge(); but my requirement is set the expire time until close the browser or logout.
    And one more thing is how to delete cookies while logout.
    Thanks in advance
    achchayya.

    Hey,
    I understand what you are trying to say. solution is simple dont set setMaxAge , just create cookie and use it. It will be valid till you close the browser.
    Regards,
    SRI

  • How to set the expiry time of an image

    how to set the expiry time of an image from within the servlet or jsp

    I am sending an image with the page, so the set the page expiry in the browser cache we can use META tags of html or response.setDateHeader to set the Expires attribute, this setting the expiry time of the page but is not setting the expiry time of the image which is going with the page

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B

    Hi Friends,
    How to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    External Trading Partner is sending the EDI 856 via AS2 URL to our Oracle B2B Server.
    In the inbound 856 agreement, we have checked the option of Funtional Ack and also Functiona Ack handled by B2B is yes.
    We have the outbound agreement which is sending that Functional ack 997 (auto generated by oracle b2b) and we have specified the Outbound AS2 channel of the Partner.
    997 doc is being sent to external partner using AS2 channel, but the filename is generating as '40101'.
    Please can you let me know how to set the AS2 fileName for outbound Functional Ack 997 auto generated by Oracle B2B.
    Appreciate your valuable answers!!
    Thanks,
    Amirineni

    Amirineni,
    AFAIK, there is no option to set the file name when the 997 is generated automatically by B2B.
    Alternatively, if this is a must requirement, you can generate the FA from backend and  send to B2B with MSG_TYPE =9. In this case, you can set the header with filename (How to set the actionname property in B2B 11g)

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • How to set the stack size for alchemy application?

    Anybody know how to set the stack size for alchemy application?
    If you know, please tell me how to adjust the stack size for alchemy application?

    Hi,
    The stack size is set as public const gstackSize in the alchemy generated code.  You can see this if you build with ACHACKS_TMPS set.  The default is one megabyte.
    One way to change the stack size is to use llvm-dis to disassemble avm2-libc/lib/avm2-libc.l.bc, generating avm2-libc.l.ll, modify the constant, and then use llvm-as to recompile your modified library and overwrite the old one.  These utilities should be in your path if alchemy is set up.

  • When will I receive my I phone 6 case which i ordered along with the Iphone6 ?As per the website it says october . How long is the wait time for the Iphone 6 case?

    When will I receive my I phone 6 case which i ordered along with the I phone 6 ?As per the website it says October. How long is the wait time for the I phone 6 case?

    While we have no idea within this Community Forum how long you would have to wait for your iPhone 6 Case, I can tell you that there would not be a "general" answer of value.  Like any product that is available in different materials and colors, the inventory varies based on what you have specifically ordered.  For example, I visited an Apple Store on the day after the iPhone 6 became available and was interested in the "Midnight Blue" Leather"  Apple iPhone 6 Case.  The store had plenty of all the other colors, but that specific case and color had sold out that morning. 

Maybe you are looking for

  • Error in import table data using oracle datapump

    i am trying to import table data using oracle datapump CREATE TABLE emp_xt ( ID NUMBER, NAME VARCHAR2(30) ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY backup LOCATION ('a.dmp') it return the following error ORA-29913: error in execu

  • Itunes freezes and stops responding after about 1 minute of being open

    This problem has been happening only recently. It just freezes, I logged onto my computer yesterday and it did the same thing. And it's doing it again today!! its really frustrating! I just re-installed itunes, the latest version for windows. My comp

  • Help!  I bought iLife 08, but it won't put iMovie on my laptop

    How can I download an older version of iMovie that WOULD work on my G4? What version should it be?

  • OS username & password

    Hi All, I have installed Oracle 10g(Version 10.1) in WindowsXP Environment, When I open Oracle Enterprise Manager, It is asking me for OS username and password below that Oracle username and password. My problem is, when I use PC Admin account, it sa

  • Create 1500 separate movies from a single timeline?

    Hi, I have received a request for a quote from a client who wants to have an actor read out 1500 names, each of which will need to be rendered out as separate movies from a single timeline in PPro, based on cue points that we will have to set manuall