1. /*
  2. * @(#)ServantCachingPolicy.java 1.3 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.extension ;
  8. import org.omg.CORBA.Policy ;
  9. import org.omg.CORBA.LocalObject ;
  10. import com.sun.corba.se.internal.orbutil.ORBConstants ;
  11. /** Policy used to implement servant caching optimization in the POA.
  12. */
  13. public class ServantCachingPolicy extends LocalObject implements Policy
  14. {
  15. private static ServantCachingPolicy policy = null ;
  16. private ServantCachingPolicy()
  17. {
  18. }
  19. public synchronized static ServantCachingPolicy getPolicy()
  20. {
  21. if (policy == null)
  22. policy = new ServantCachingPolicy() ;
  23. return policy ;
  24. }
  25. public int policy_type ()
  26. {
  27. return ORBConstants.SERVANT_CACHING_POLICY ;
  28. }
  29. public org.omg.CORBA.Policy copy ()
  30. {
  31. return this ;
  32. }
  33. public void destroy ()
  34. {
  35. }
  36. }