/hazelcast/src/main/java/com/hazelcast/core/ICollection.java

https://bitbucket.org/gabral6_gmailcom/hazelcast · Java · 49 lines · 6 code · 4 blank · 39 comment · 0 complexity · 6047cf57521b023482bd8de678ed5c21 MD5 · raw file

  1. /*
  2. * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package com.hazelcast.core;
  17. /**
  18. * Concurrent, distributed, partitioned, observable collection.
  19. *
  20. * @param <E> item
  21. */
  22. public interface ICollection<E> extends Instance {
  23. /**
  24. * Returns the name of this collection
  25. *
  26. * @return name of this collection
  27. */
  28. String getName();
  29. /**
  30. * Adds an item listener for this collection. Listener will get notified
  31. * for all collection add/remove events.
  32. *
  33. * @param listener item listener
  34. * @param includeValue <tt>true</tt> updated item should be passed
  35. * to the item listener, <tt>false</tt> otherwise.
  36. */
  37. void addItemListener(ItemListener<E> listener, boolean includeValue);
  38. /**
  39. * Removes the specified item listener.
  40. * Returns silently if the specified listener is not added before.
  41. *
  42. * @param listener item listener for this collection
  43. */
  44. void removeItemListener(ItemListener<E> listener);
  45. }