Click here to Skip to main content
15,889,266 members
Home / Discussions / Java
   

Java

 
Questionjava access specifier Pin
javaPest16-Mar-15 5:43
professionaljavaPest16-Mar-15 5:43 
AnswerRe: java access specifier Pin
Richard MacCutchan22-Mar-15 0:03
mveRichard MacCutchan22-Mar-15 0:03 
Questiondata type Pin
Member 1152879816-Mar-15 1:39
Member 1152879816-Mar-15 1:39 
AnswerRe: data type Pin
javaPest16-Mar-15 5:38
professionaljavaPest16-Mar-15 5:38 
GeneralRe: data type Pin
Richard MacCutchan22-Mar-15 0:02
mveRichard MacCutchan22-Mar-15 0:02 
AnswerRe: data type Pin
Richard MacCutchan22-Mar-15 0:02
mveRichard MacCutchan22-Mar-15 0:02 
Questionupdate Pin
Member 1152879816-Mar-15 1:37
Member 1152879816-Mar-15 1:37 
QuestionNeed to improve performance Multi-Threading code Pin
Abhi_aec15-Mar-15 21:07
Abhi_aec15-Mar-15 21:07 
I need to improve performace, which is implementing Multi-Threading.
My problem is:
1. future.get(); is taking too much time.
2. executor.shutdown(); also taking much time.
Below is my piece of code code we are using below code:
Java
Map<String, List<? extends Object>> entirelist = null;
							ExecutorService executor = Executors.newFixedThreadPool(maxThread);
							
							entirelist = manageCJObject.populateCS(cJGroup, load
					
					future = executor.submit(new CsThread(clDAO, entirelist, isUpdate, dbList));
							
					 try {
                  if (future != null) {
            	long startTime = Calendar.getInstance().getTimeInMillis();
                String result = future.get();
                System.out.println("Total Time in future.get "+ (Calendar.getInstance().getTimeInMillis()-startTime));
            }
            long startTime1 = Calendar.getInstance().getTimeInMillis();
            executor.shutdown();
            executor.awaitTermination(
                    Constants.INT_VALUE_THIRTY,
                    TimeUnit.MINUTES);
            System.out.println("Total Time in exec shutdown "+ (Calendar.getInstance().getTimeInMillis()-startTime1));
        } 
        catch (ExecutionException execp) {
            logger.error("Error dering Thread execution :: " + execp.getMessage());
            throw new CLException(execp.getMessage());

        }


Kindly let me know how to improve performance. And what way we can provide any alternate of future.get() and executor.shutdown()
AnswerRe: Need to improve performance Multi-Threading code Pin
Eli Zaslavchik13-Apr-15 3:04
Eli Zaslavchik13-Apr-15 3:04 
QuestionCristal Report Pin
Manjeet Kumar Nai14-Mar-15 1:22
professionalManjeet Kumar Nai14-Mar-15 1:22 
Questionecc diffie hellman Pin
Member 1152168512-Mar-15 22:45
Member 1152168512-Mar-15 22:45 
AnswerRe: ecc diffie hellman Pin
Richard MacCutchan12-Mar-15 23:53
mveRichard MacCutchan12-Mar-15 23:53 
GeneralRe: ecc diffie hellman Pin
harold aptroot14-Mar-15 2:21
harold aptroot14-Mar-15 2:21 
QuestionSubstitution Cipher Cryptanalysis Pin
nicolas El Khoury410-Mar-15 12:06
nicolas El Khoury410-Mar-15 12:06 
SuggestionRe: Substitution Cipher Cryptanalysis Pin
Richard MacCutchan10-Mar-15 21:50
mveRichard MacCutchan10-Mar-15 21:50 
QuestionThread Creation Pin
Sarita S9-Mar-15 23:21
Sarita S9-Mar-15 23:21 
AnswerRe: Thread Creation Pin
Richard MacCutchan10-Mar-15 21:51
mveRichard MacCutchan10-Mar-15 21:51 
AnswerRe: Thread Creation Pin
Eli Zaslavchik13-Apr-15 3:11
Eli Zaslavchik13-Apr-15 3:11 
QuestionMethod Calling Pin
William O'Neil9-Mar-15 7:05
William O'Neil9-Mar-15 7:05 
AnswerRe: Method Calling Pin
Richard MacCutchan9-Mar-15 7:56
mveRichard MacCutchan9-Mar-15 7:56 
GeneralRe: Method Calling Pin
William O'Neil9-Mar-15 8:35
William O'Neil9-Mar-15 8:35 
GeneralRe: Method Calling Pin
Richard MacCutchan9-Mar-15 8:40
mveRichard MacCutchan9-Mar-15 8:40 
QuestionNeed Help Adding Image onto Applet Pin
VietAnh1627-Mar-15 10:09
VietAnh1627-Mar-15 10:09 
AnswerRe: Need Help Adding Image onto Applet Pin
Richard MacCutchan7-Mar-15 22:17
mveRichard MacCutchan7-Mar-15 22:17 
AnswerRe: Need Help Adding Image onto Applet Pin
PeraDll14-Mar-15 9:42
PeraDll14-Mar-15 9:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.