Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

concurrent.DelayQueue.remove

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks in advance. Can any one help me
in this class when i call the removeFromQueue() method i am getting exeception :

java.lang.ClassCastException: in.co.netsol.niab.portal.processbean.databaseconsole.CodeskPurgeTask
in.co.netsol.niab.portal.processbean.databaseconsole.ScheduleDBPurgeDelay.compareTo(ScheduleDBPurgeDelay.java:1)
java.util.PriorityQueue.remove(PriorityQueue.java:340)
java.util.concurrent.DelayQueue.remove(DelayQueue.java:354)
in.co.netsol.niab.portal.processbean.databaseconsole.PurgeDelayThread.removeFromQueue(PurgeDelayThread.java:106)
in.co.netsol.niab.portal.actions.settings.DatabasePurgeSettingsAction.doPost(DatabasePurgeSettingsAction.java:93)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802

[Updated to include code tags - Paul Sturrock]
[ July 19, 2006: Message edited by: Paul Sturrock ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you are adding instances of ScheduleDBPurgeDelay, but trying to remove instances of CodeskPurgeTask, which doesn't work.
 
kiranrs iyengar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, but i have changed the code and made it as ScheduleDBPurgeDelay intance
now i am getting exception
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic