Java Doc for DeletionPlugin.java in  » Science » Cougaar12_4 » org » cougaar » core » plugin » deletion » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.core.plugin.deletion 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.core.plugin.ComponentPlugin
   org.cougaar.core.plugin.deletion.DeletionPlugin

All known Subclasses:   org.cougaar.planning.plugin.deletion.TaskDeletionPlugin,
DeletionPlugin
public class DeletionPlugin extends ComponentPlugin (Code)
This component removes Deletable blackboard objects according to policy and their age.

How to Configure the DeletionPlugin:

The DeletionPlugin runs according to a prescribed schedule to find Deletable objects on the blackboard and delete them if they are ready to be deleted. These actions are controlled by a DelectionSchedulePolicy and one or more DeletionPolicy objects on the blackboard. The DeletionPlugin guarantees that there is always a DefaultDeletionPolicy present by creating on at startup (or restart) if there is not one already present.

DeletionSchedulePolicy:

The deletion schedule is characterized primarily by a period (how often) and a phase (at what time of day). The public interface of the standard DeletionSchedulePolicy allows all aspects of the schedule to be altered including adding specific times for deletion to occur. The current DeletionPlugin implementation insures that exactly one DeletionSchedulePolicy exists on the blackboard creating one if necessary and deleting extraneous ones. If an existing policy is found, it is left as is. Subclasses could choose to insure that the periodic schedule parameters agree with the values specified as plugin parameters.

DefaultDeletionPolicy:

The DeletionPlugin also guarantees that there is exactly one default DeletionPolicy on the blackboard. If there are none, one is created using plugin parameters. If there are multiples (should never happen), extras are deleted.

DeletionPlugin Parameters:

The DeletionPlug accepts four named parameters as follows:

 deletionDelay=<long default 15 days>
 deletionPeriod=<long default 7 days>
 deletionPhase=<long 0 (midnight)>
 archivingEnabled=<boolean>
 

The archivingEnable parameter causes a persistence snapshot to be taken for archiving purposes prior to doing deletions.



Field Summary
final protected static  StringARCHIVING_ENABLED_PREFIX
    
final protected static  booleanDEFAULT_ARCHIVING_ENABLED
    
final protected static  longDEFAULT_DELETION_DELAY
    
final protected static  longDEFAULT_DELETION_PERIOD
    
final protected static  longDEFAULT_DELETION_PHASE
    
final protected static  StringDELETION_DELAY_PREFIX
    
final protected static  StringDELETION_PERIOD_PREFIX
    
final protected static  StringDELETION_PHASE_PREFIX
    
protected  Alarmalarm
    
protected  booleanarchivingEnabled
    
protected  CollectionSubscriptiondeletionPolicies
    
protected  UnaryPredicatedeletionPolicyPredicate
    
protected  SortedSetdeletionPolicySet
    
protected  CollectionSubscriptiondeletionSchedulePolicies
    
protected  UnaryPredicatedeletionSchedulePolicyPredicate
    
final protected static  SimpleDateFormatdeletionTimeFormat
    
protected  LoggingServicelogger
    
protected  longscenarioNow
    
final protected static  longsubscriptionExpirationTime
    
protected  longsystemNow
    
protected  DeletionSchedulePolicytheDeletionSchedulePolicy
    
protected static  UnaryPredicatetruePredicate
    
protected  UIDServiceuidService
    


Method Summary
protected  voidcheckDeletables()
    
protected  voidcheckDeletionSchedulePolicies(long deletionPeriod, long deletionPhase)
     Check to see if the default schedule policy is present.
public  voidexecute()
     Runs only when the alarm expires.
public  voidload()
    
protected  booleanparseBooleanParameter(String param, String prefix, boolean dflt)
    
protected  longparseLongParameter(String param, String prefix, long dflt)
    
protected  voidsetAlarm()
    
public  voidsetLoggingService(LoggingService ls)
    
public  voidsetUIDService(UIDService uidService)
    
protected  voidsetupSubscriptions()
    

Field Detail
ARCHIVING_ENABLED_PREFIX
final protected static String ARCHIVING_ENABLED_PREFIX(Code)



DEFAULT_ARCHIVING_ENABLED
final protected static boolean DEFAULT_ARCHIVING_ENABLED(Code)



DEFAULT_DELETION_DELAY
final protected static long DEFAULT_DELETION_DELAY(Code)



DEFAULT_DELETION_PERIOD
final protected static long DEFAULT_DELETION_PERIOD(Code)



DEFAULT_DELETION_PHASE
final protected static long DEFAULT_DELETION_PHASE(Code)



DELETION_DELAY_PREFIX
final protected static String DELETION_DELAY_PREFIX(Code)



DELETION_PERIOD_PREFIX
final protected static String DELETION_PERIOD_PREFIX(Code)



DELETION_PHASE_PREFIX
final protected static String DELETION_PHASE_PREFIX(Code)



alarm
protected Alarm alarm(Code)



archivingEnabled
protected boolean archivingEnabled(Code)



deletionPolicies
protected CollectionSubscription deletionPolicies(Code)



deletionPolicyPredicate
protected UnaryPredicate deletionPolicyPredicate(Code)



deletionPolicySet
protected SortedSet deletionPolicySet(Code)



deletionSchedulePolicies
protected CollectionSubscription deletionSchedulePolicies(Code)



deletionSchedulePolicyPredicate
protected UnaryPredicate deletionSchedulePolicyPredicate(Code)



deletionTimeFormat
final protected static SimpleDateFormat deletionTimeFormat(Code)



logger
protected LoggingService logger(Code)



scenarioNow
protected long scenarioNow(Code)



subscriptionExpirationTime
final protected static long subscriptionExpirationTime(Code)



systemNow
protected long systemNow(Code)



theDeletionSchedulePolicy
protected DeletionSchedulePolicy theDeletionSchedulePolicy(Code)



truePredicate
protected static UnaryPredicate truePredicate(Code)



uidService
protected UIDService uidService(Code)





Method Detail
checkDeletables
protected void checkDeletables()(Code)



checkDeletionSchedulePolicies
protected void checkDeletionSchedulePolicies(long deletionPeriod, long deletionPhase)(Code)
Check to see if the default schedule policy is present. If a DeletionSchedulePolicy is found then it is left as is. If no DeletionSchedulePolicy is found, a new one created and added. If multiple schedule policies are found, all but one is deleted. Subclasses may wish to set the periodic schedule parameters to match the specified values, but the base implementation only uses the values if a new policy must be created.



execute
public void execute()(Code)
Runs only when the alarm expires. The procedure is: Find new allocations for tasks that deletable and mark the allocations Find tasks with deletable dispositions and mark them Find deletable tasks that are subtasks of an expansion and remove them from the expansion and remove them from the logplan.



load
public void load()(Code)



parseBooleanParameter
protected boolean parseBooleanParameter(String param, String prefix, boolean dflt)(Code)



parseLongParameter
protected long parseLongParameter(String param, String prefix, long dflt)(Code)



setAlarm
protected void setAlarm()(Code)
Set the alarm so that it expires when the time is next congruent to the deletionPhase modulo the deletionPeriod



setLoggingService
public void setLoggingService(LoggingService ls)(Code)



setUIDService
public void setUIDService(UIDService uidService)(Code)



setupSubscriptions
protected void setupSubscriptions()(Code)



Methods inherited from org.cougaar.core.plugin.ComponentPlugin
abstract protected void execute()(Code)(Java Doc)
protected ConfigFinder getConfigFinder()(Code)(Java Doc)
abstract protected void setupSubscriptions()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.