How to get the size of the binary cache from code
Is there a way to get the size of the cache in bytes? (size() method retrieves the number of objects, as when the size of the cache is limited in configuration by unit-calculator 'BINARY')?Hey Meir,
As Wei said that there is a JMX exposed for each cache bean and you can just summarize the units attribute. There is a second attribute called UnitFactor that you also use to be precise. In most cases, UnitFactor will be 1 but the appropriate calculation of size in bytes of a cache is
Units * UnitFactor
Second, you ask this cache across all members of storage and summarize the results. This will give you then the size that includes the key and value but not take account of all sizes to index.
An easy way to make JMX requests within the coherence is:
String cacheName = "";
MBeanServer mbs = MBeanHelper.findMBeanServer();
Set names = mbsc.queryNames(new ObjectName("Coherence:type=Cache,service=*,name=" + cacheName + ",*"), null);
long totalUnits = 0;
for (ObjectName name : names) {
Integer units = (Integer) mbs.getAttribute(name, "Units");
Integer unitFactor = (Integer) mbs.getAttribute(name, "UnitFactor");
totalUnits += (units * unitFactor);
}
System.out.println("Total Units = " + totalUnits);
There are other ways to get the size too.
You could write an aggregator that calls BinaryMemoryCalculator.INSTANCE.calculateUnits with the binary key and the value of each entry that went. This would not be very effective, but would be useful if you want to calculate the size of a subset filtered registration.
You could write a remained that gets the support of the cache card you want, cast to LocalCache and then call the appropriate methods to get unitfactor and units. You must run this invoked on each Member of storage.
JK
Tags: Fusion Middleware
Similar Questions
-
How to get the current position from the point of view
can I know how to get the current position of the view?
Edited by: anIdiot July 27, 2011 22:011 - get belvedere of the universe:
u = new SimpleUniverse (canvas3D);
ViewPlat = u.getViewingPlatform (); view of the universedefinition viewplat: ViewingPlatform ViewPlat;
2 - get look a transform of the platform in an existing Transform3D
ViewPlat.getViewPlatformTransform () .getTransform (t3d).
3 - Look at the trandform: t3d.get (Quater1, vector1); orientation object Get and coords
Kind regards.
JFP -
How to get the return value from Java runtime.getRuntime.exec?
I am running shell from a (GR 11, 2) Oracle database commands on aix.
But, I would get a return value of a shell comand... as you get with "echo $?"
I use a code like
but I do not get a return value... because I don't know how to get the return value...CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS import java.io.*; public class Host { public static int executeCommand(String command) { int retval=0; try { String[] finalCommand; finalCommand = new String[3]; finalCommand[0] = "/bin/sh"; finalCommand[1] = "-c"; finalCommand[2] = command; final Process pr = Runtime.getRuntime().exec(finalCommand); pr.waitFor(); } catch (Exception ex) { System.out.println(ex.getLocalizedMessage()); retval=-1; } return retval; }; /
Published by: user9158455 on 22-Sep-2010 07:33Hello
Your pr.exitValue () has tried?
I think you also need a finally block that destroys the sub-process
Concerning
Peter -
How to get the selected values from the shuttle
Hello
Please tell me how to get the values of the option chosen by the shuttle leading the list.
Thank youCheck out this link and that this might help you.
Thank you
-Anil
http://oracleanil.blogspot.com/ -
How to get the product key from old computer running XP SP1 until she is thrown?
How can I get my registration code from my old computer with xp with service pack 1 before I throw it away
* original title - how can I get my registration key of xp to xp I can see all the files in my computer *.
Hello
You can get the product key of your Windows XP CD. To get the key from your computer, you might have to look by using a third party app that could help you achieve the same.
Please use your favorite search engine and browse for such a program that is used to.
Note: This response contains a reference to third party World Wide Web site. Microsoft provides this information as a convenience to you. Microsoft does not control these sites and no has not tested any software or information found on these sites; Therefore, Microsoft cannot make any approach to quality, security or the ability of a software or information that are there. There are the dangers inherent in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
-
How to get the items selected from indesign Document?
Hi all
I'm trying to get the objects selected by the user in the indesign document, to which the following code, I wrote, but his does not collect do not.
LayoutTarget InterfacePtr < ILayoutTarget > (myContext, UseDefaultIID());
if (layoutTarget == nil)
{
() CAlert::ErrorAlert
"layouttarget sucks" );
breaking ;
}
UIDList itemList = layoutTarget-> GetUIDList (kStripStandoffs);
where mycontext is IActiveContext and after getting the itemlist (all managers of related texts).
How to perceive the limits of the textframe? (TopLeft, TopRight, BottomLeft, BottomRight).
Thanks and greetings
Sanjeev.k
You must initialize the ILayoutTarget with a CSB. As
InterfacePtr
iLayoutCSB (iSelectionManager-> QueryConcreteSelectionBoss (kNewLayoutSelectionBoss)); InterfacePtr
layoutTarget (iLayoutCSB, UseDefaultIID()); HTH.
Jasmine
-
Hi all
I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.
What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?
Thanks in advance.
Rachiud
doScript() evaluates an expression, so just make sure that your Javascript is an expression.
For instance "(3 + 3)" 6 "
-
How to get the file downloaded from ECS
Hello
I have the situation where I have to send back the ECS file we downloaded in B2B configurations.
Unfortunately we lost the ecs file we downloaded. Is there a way we can recover the file ecs.
Concerning
KiranHello
It is strongly recommended to access the tables directly unless there is a strong personalization use case. Using the layer BLL is perhaps the right thing to do.
Anyway, here's the information on ecs tbl file:
Select b.SID from tip_parameter_t a, TIP_DOCUMENTTYPEPARAMETERVAL_T b where a.id = b.DOCUMENTTYPEPARAMETER and b.SID like '% % ECS ';Need to connect the 2 following tables to get to the DTD/XSD.
tip_documentdefinition_t
tip_nativedatatype_TRgds,
Riou -
How to get the previous week from Monday to Sunday from sysdate
for example, sysdate is 15-SEP-07 We must retrieve the data from SEPT. 01.-15-06 - SEP - 2015, although 31 August 15 is Monday our application must ignore since the current month is September
SQL> with t 2 as 3 ( 4 select to_date('07-SEP-15', 'dd-mon-rr') my_sysdate 5 from dual 6 ) 7 select greatest(trunc(my_sysdate, 'iw') - 7, trunc(my_sysdate, 'month')) start_date 8 , trunc(my_sysdate, 'iw') - 1 end_date 9 from t; START_DAT END_DATE --------- --------- 01-SEP-15 06-SEP-15
-
How to get the value of the outputtext in javascript and send it to backing bean
Hi Experts ADF,
JDev Version 11.1.1.7.0
I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.
Help, please. Thanks in advance.
< af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.
filterable = "true" sortable = "true".
headerText = "#{suiviewBundle.EXCEPTIONS} '"
ID = "c16" >
< af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "
< af:clientListener type = "mouseOver".
method = "customJsFunction" / >
< af:serverListener type = "mycustomserverEvent".
Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >
< / af:outputText >
< / af:column >
JavaScript
< af:resource type = "javascript" >
var customJsFunction = function (event)
{
var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');
AdfCustomEvent.queue ();
Returns true;
}
< / af:resource >
BackingBean
public String handleServerEvent(EC ClientEvent)
{
Please let me know how to get the value that javascript code sends here.
Let's say javascript sends the value of outputtext as "001".
So, I have to check "001" in my list and return a value that appears on mouseover.
}
Kind regards
RoyHello, Roy.
To use the value on another component of the user interface, I shows an example:
-code of the page
shortDesc = "shortDesc" >
method = "customJsFunction" / >
-the javascript code
var customJsFunction = function (event)
{
var exceptiondata = event.getSource ().findComponent("ot32").getValue ();
AdfCustomEvent.queue (event.getSource (),
"mycustomserverEvent,"
{param1:exceptiondata},
(true);
Returns true;
}
-OutputTextCase11.java
public void handleServerEvent (EC ClientEvent)
{
String param = (String) ce.getParameters () .get ("param1");
RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");
outputText.setShortDesc (param);
outputText.setValue (param);
AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);
}
I hope this helps you.
RFH.
-
How to get the latest fix for CPU
Hi gurus,
Hello.
How to get the latest information from CPU fix for our system EBS 11i, how to get alerts whenever they have released patches of CPU.Hi DBA.
Please check this, hope this helps.
See the metaink notes:
Releases of Oracle E-Business Suite 11i and 12 Critical Patch Update knowledge Document (October 2010) [ID 987438.1]
Information OCT - 2010 CPU patches:
http://www.Oracle.com/technetwork/topics/security/cpuoct2010-175626.html
on the paths of the CPU:
http://www.Oracle.com/technetwork/topics/security/alerts-086861.html
For the email subscription:
http://www.Oracle.com/technetwork/topics/security/securityemail-090378.html
Published by: Amigo on December 22, 2010 07:26
Published by: Amigo on December 22, 2010 07:29
-
DVT:pivotFilterBar - how to get the selected values of the filter
Hi all
I have a question: how to get the selected values from the pivot table filter bar programmatically?
I tried to use
but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
Environment: JDev 11.1.1.3.0 without tasks.
Thank you
MiroslawHello
You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:
Download the template of the bar pivot filter instance
QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
ListcriterionList = conjunctionCriterion.getCriterionList ();
for (int i = 0; i)<_criterionList.size(); i++)="">
AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion._selected is the currently selected value
Selected object = criterion.getValues () .get (0);System.out.println (_selected);
}Hope that helps,
Chadwick -
Get the byte [] for a COD that is already installed
Anyone happens to know and be willing to share, how to get the byte [] for a COD package that is already installed on the device?
Thank you
There is no API on the device that allow you to programmatically access binary data of a cod file.
You can copy files of cod on a BlackBerry Smartphone using javaloader.
JavaLoader u save filename.cod
-
How to get the physical size of the screen?
Hi all
How to get the physical width and height of the screen (not resolution) in inches or in centimeters?
Is there a method to do
Thank you very much
Display.getWidth () and Display.getHeight () you will get the number of pixels.
Display.getHorizontalResolution (); and Display.getVerticalResolution () to get the pixels per meter. Then by dividing appropriately you can find the actual size.
-
How to get the actual size of control?
How to get the real size control when the preferred width/height is not defined but control have size which are automatically evaluated (for example contaier with the disposal of the battery)?
Try the LayoutUpdateHandler: https://developer.blackberry.com/cascades/reference/bb__cascades__layoutupdatehandler.html
Maybe you are looking for
-
Hi everyone new g70 - 70 owner, I look FORWARD 8.1 and you want to get off at 7. I have created a backup of the system to an external hard drive. I find my product key of victory 8 and recorded on a doc, my questions are; It has a hybrid with mechani
-
Just bought the 16 g W450 and went to use for the first time yesterday and could not do any music to play. I hear notifications saying 'started training' ect and the FM radio works fine, but no matter what kind of music I synced or even the music of
-
Marking of questions collecting paper in a Deskjet 2050
Here is a video on the correction of the paper pickup issues in a Deskjet 2050 printer. It will give a visual guide for the collection of paper troubleshooting problem. The steps which will focus on the video are: 1. reset of the product. 2. check th
-
Computer does not connect to Tv (HDMI)
I would like to watch movies and tv on my tv through my computer shows. I used an HDMI input to connect to my tv and the sound worked for a while. But the other day I had to scoot my computer and I unplugged the cable hdmi from my computer while it w
-
BlackBerry App MIDlet - HttpConnection
Hello I am writing my first app for Blackberry (or any other mobile device) and I'm having a problem making a Blackberry Simulator http request to a WCF service that is running locally. I use the Blackberry Eclipse plug-in, so when I run the applicat