[jbosscache-commits] JBoss Cache SVN: r7485 - in core/branches/flat: src/main/docbook/faq/en and 70 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Fri Jan 16 09:06:36 EST 2009
Author: manik.surtani at jboss.com
Date: 2009-01-16 09:06:35 -0500 (Fri, 16 Jan 2009)
New Revision: 7485
Added:
core/branches/flat/src/main/java/org/horizon/
core/branches/flat/src/main/java/org/horizon/Cache.java
core/branches/flat/src/main/java/org/horizon/CacheDelegate.java
core/branches/flat/src/main/java/org/horizon/CacheException.java
core/branches/flat/src/main/java/org/horizon/CacheSPI.java
core/branches/flat/src/main/java/org/horizon/EvictionManager.java
core/branches/flat/src/main/java/org/horizon/annotations/
core/branches/flat/src/main/java/org/horizon/atomic/
core/branches/flat/src/main/java/org/horizon/atomic/APITest.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapTest.java
core/branches/flat/src/main/java/org/horizon/batch/
core/branches/flat/src/main/java/org/horizon/cluster/
core/branches/flat/src/main/java/org/horizon/commands/
core/branches/flat/src/main/java/org/horizon/config/
core/branches/flat/src/main/java/org/horizon/container/
core/branches/flat/src/main/java/org/horizon/context/
core/branches/flat/src/main/java/org/horizon/eviction/
core/branches/flat/src/main/java/org/horizon/eviction/EvictionWatcher.java
core/branches/flat/src/main/java/org/horizon/eviction/FIFOPolicyTest.java
core/branches/flat/src/main/java/org/horizon/executors/
core/branches/flat/src/main/java/org/horizon/factories/
core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetectorTest.java
core/branches/flat/src/main/java/org/horizon/interceptors/
core/branches/flat/src/main/java/org/horizon/invocation/
core/branches/flat/src/main/java/org/horizon/io/
core/branches/flat/src/main/java/org/horizon/jmx/
core/branches/flat/src/main/java/org/horizon/lifecycle/
core/branches/flat/src/main/java/org/horizon/loader/
core/branches/flat/src/main/java/org/horizon/lock/
core/branches/flat/src/main/java/org/horizon/lock/LockContainerHashingTest.java
core/branches/flat/src/main/java/org/horizon/manager/
core/branches/flat/src/main/java/org/horizon/manager/CacheManagerComponentRegistryTest.java
core/branches/flat/src/main/java/org/horizon/manager/CacheManagerTest.java
core/branches/flat/src/main/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java
core/branches/flat/src/main/java/org/horizon/marshall/
core/branches/flat/src/main/java/org/horizon/marshall/Marshaller.java
core/branches/flat/src/main/java/org/horizon/notifications/
core/branches/flat/src/main/java/org/horizon/notifications/EventLog.java
core/branches/flat/src/main/java/org/horizon/remoting/
core/branches/flat/src/main/java/org/horizon/statetransfer/
core/branches/flat/src/main/java/org/horizon/transaction/
core/branches/flat/src/main/java/org/horizon/tree/
core/branches/flat/src/main/java/org/horizon/util/
core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java
core/branches/flat/src/main/java/org/horizon/util/UnitTestTestNGListener.java
core/branches/flat/src/main/java/org/horizon/util/internals/
Removed:
core/branches/flat/src/main/java/org/horizon/commands/read/GravitateDataCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/AnnounceBuddyPoolNameCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/AssignToBuddyGroupCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/DataGravitationCleanupCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/RemoveFromBuddyGroupCommand.java
core/branches/flat/src/main/java/org/horizon/config/BuddyReplicationConfig.java
core/branches/flat/src/main/java/org/horizon/config/parsing/element/BuddyElementParser.java
core/branches/flat/src/main/java/org/horizon/factories/BuddyManagerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/NullComponentFactory.java
core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapper.java
core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapperMBean.java
core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationBroadcaster.java
core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationListener.java
core/branches/flat/src/main/java/org/horizon/jmx/JmxUtil.java
core/branches/flat/src/main/java/org/horizon/jmx/LegacyConfiguration.java
core/branches/flat/src/main/java/org/horizon/marshall/ExtendedMarshaller.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/BuddyGroupChanged.java
core/branches/flat/src/main/java/org/horizon/notifications/event/BuddyGroupChangedEvent.java
core/branches/flat/src/main/java/org/jboss/cache/
core/branches/flat/src/main/java/org/jboss/starobrno/Cache.java
core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java
core/branches/flat/src/main/java/org/jboss/starobrno/CacheException.java
core/branches/flat/src/main/java/org/jboss/starobrno/CacheSPI.java
core/branches/flat/src/main/java/org/jboss/starobrno/EvictionManager.java
core/branches/flat/src/main/java/org/jboss/starobrno/atomic/
core/branches/flat/src/main/java/org/jboss/starobrno/batch/
core/branches/flat/src/main/java/org/jboss/starobrno/cluster/
core/branches/flat/src/main/java/org/jboss/starobrno/commands/
core/branches/flat/src/main/java/org/jboss/starobrno/config/
core/branches/flat/src/main/java/org/jboss/starobrno/container/
core/branches/flat/src/main/java/org/jboss/starobrno/context/
core/branches/flat/src/main/java/org/jboss/starobrno/eviction/
core/branches/flat/src/main/java/org/jboss/starobrno/executors/
core/branches/flat/src/main/java/org/jboss/starobrno/factories/
core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/
core/branches/flat/src/main/java/org/jboss/starobrno/invocation/
core/branches/flat/src/main/java/org/jboss/starobrno/io/
core/branches/flat/src/main/java/org/jboss/starobrno/jmx/annotations/
core/branches/flat/src/main/java/org/jboss/starobrno/lifecycle/
core/branches/flat/src/main/java/org/jboss/starobrno/loader/
core/branches/flat/src/main/java/org/jboss/starobrno/lock/
core/branches/flat/src/main/java/org/jboss/starobrno/manager/
core/branches/flat/src/main/java/org/jboss/starobrno/marshall/
core/branches/flat/src/main/java/org/jboss/starobrno/notifications/
core/branches/flat/src/main/java/org/jboss/starobrno/remoting/
core/branches/flat/src/main/java/org/jboss/starobrno/statetransfer/
core/branches/flat/src/main/java/org/jboss/starobrno/transaction/
core/branches/flat/src/main/java/org/jboss/starobrno/tree/
core/branches/flat/src/main/java/org/jboss/starobrno/util/
core/branches/flat/src/test/java/org/jboss/starobrno/atomic/
core/branches/flat/src/test/java/org/jboss/starobrno/eviction/
core/branches/flat/src/test/java/org/jboss/starobrno/factories/scopes/
core/branches/flat/src/test/java/org/jboss/starobrno/loader/
core/branches/flat/src/test/java/org/jboss/starobrno/lock/
core/branches/flat/src/test/java/org/jboss/starobrno/manager/
core/branches/flat/src/test/java/org/jboss/starobrno/notifications/
core/branches/flat/src/test/java/org/jboss/starobrno/util/
Modified:
core/branches/flat/pom.xml
core/branches/flat/src/main/docbook/faq/en/master.xml
core/branches/flat/src/main/docbook/userguide/en/modules/basic_api.xml
core/branches/flat/src/main/docbook/userguide/en/modules/cache_loaders.xml
core/branches/flat/src/main/docbook/userguide/en/modules/configuration.xml
core/branches/flat/src/main/docbook/userguide/en/modules/configuration_reference.xml
core/branches/flat/src/main/docbook/userguide/en/modules/deployment.xml
core/branches/flat/src/main/docbook/userguide/en/modules/eviction_policies.xml
core/branches/flat/src/main/java/org/horizon/annotations/MBean.java
core/branches/flat/src/main/java/org/horizon/annotations/ManagedAttribute.java
core/branches/flat/src/main/java/org/horizon/annotations/ManagedOperation.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMap.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapDelta.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapProxy.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicMap.java
core/branches/flat/src/main/java/org/horizon/atomic/AtomicMapCache.java
core/branches/flat/src/main/java/org/horizon/atomic/ClearOperation.java
core/branches/flat/src/main/java/org/horizon/atomic/Delta.java
core/branches/flat/src/main/java/org/horizon/atomic/DeltaAware.java
core/branches/flat/src/main/java/org/horizon/atomic/NullDelta.java
core/branches/flat/src/main/java/org/horizon/atomic/Operation.java
core/branches/flat/src/main/java/org/horizon/atomic/PutOperation.java
core/branches/flat/src/main/java/org/horizon/atomic/RemoveOperation.java
core/branches/flat/src/main/java/org/horizon/batch/AutoBatchSupport.java
core/branches/flat/src/main/java/org/horizon/batch/BatchContainer.java
core/branches/flat/src/main/java/org/horizon/cluster/ReplicationQueue.java
core/branches/flat/src/main/java/org/horizon/commands/AbstractVisitor.java
core/branches/flat/src/main/java/org/horizon/commands/CommandsFactory.java
core/branches/flat/src/main/java/org/horizon/commands/CommandsFactoryImpl.java
core/branches/flat/src/main/java/org/horizon/commands/DataCommand.java
core/branches/flat/src/main/java/org/horizon/commands/ReplicableCommand.java
core/branches/flat/src/main/java/org/horizon/commands/TransactionBoundaryCommand.java
core/branches/flat/src/main/java/org/horizon/commands/VisitableCommand.java
core/branches/flat/src/main/java/org/horizon/commands/Visitor.java
core/branches/flat/src/main/java/org/horizon/commands/read/AbstractDataCommand.java
core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java
core/branches/flat/src/main/java/org/horizon/commands/read/SizeCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java
core/branches/flat/src/main/java/org/horizon/commands/remote/ReplicateCommand.java
core/branches/flat/src/main/java/org/horizon/commands/tx/AbstractTransactionBoundaryCommand.java
core/branches/flat/src/main/java/org/horizon/commands/tx/CommitCommand.java
core/branches/flat/src/main/java/org/horizon/commands/tx/PrepareCommand.java
core/branches/flat/src/main/java/org/horizon/commands/tx/RollbackCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/ClearCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java
core/branches/flat/src/main/java/org/horizon/commands/write/ReplaceCommand.java
core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java
core/branches/flat/src/main/java/org/horizon/config/CloneableConfigurationComponent.java
core/branches/flat/src/main/java/org/horizon/config/Configuration.java
core/branches/flat/src/main/java/org/horizon/config/ConfigurationComponent.java
core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java
core/branches/flat/src/main/java/org/horizon/config/ConfigurationRegistry.java
core/branches/flat/src/main/java/org/horizon/config/CustomInterceptorConfig.java
core/branches/flat/src/main/java/org/horizon/config/Dynamic.java
core/branches/flat/src/main/java/org/horizon/config/EvictionAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/config/EvictionCacheConfig.java
core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java
core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java
core/branches/flat/src/main/java/org/horizon/config/MissingPolicyException.java
core/branches/flat/src/main/java/org/horizon/config/NonOverridable.java
core/branches/flat/src/main/java/org/horizon/config/OldFileFormatException.java
core/branches/flat/src/main/java/org/horizon/config/Option.java
core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java
core/branches/flat/src/main/java/org/horizon/config/RuntimeConfig.java
core/branches/flat/src/main/java/org/horizon/config/UnsupportedEvictionImplException.java
core/branches/flat/src/main/java/org/horizon/config/XmlParsingConfigurationRegistry.java
core/branches/flat/src/main/java/org/horizon/config/parsing/CacheConfigsXmlParser.java
core/branches/flat/src/main/java/org/horizon/config/parsing/ConfigFilesConvertor.java
core/branches/flat/src/main/java/org/horizon/config/parsing/JGroupsStackParser.java
core/branches/flat/src/main/java/org/horizon/config/parsing/ParsedAttributes.java
core/branches/flat/src/main/java/org/horizon/config/parsing/RootElementBuilder.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigHelper.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserJBC3.java
core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java
core/branches/flat/src/main/java/org/horizon/config/parsing/element/CustomInterceptorsElementParser.java
core/branches/flat/src/main/java/org/horizon/config/parsing/element/EvictionElementParser.java
core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java
core/branches/flat/src/main/java/org/horizon/container/DataContainer.java
core/branches/flat/src/main/java/org/horizon/container/MVCCEntry.java
core/branches/flat/src/main/java/org/horizon/container/NullMarkerEntry.java
core/branches/flat/src/main/java/org/horizon/container/ReadCommittedEntry.java
core/branches/flat/src/main/java/org/horizon/container/RepeatableReadEntry.java
core/branches/flat/src/main/java/org/horizon/container/UnsortedDataContainer.java
core/branches/flat/src/main/java/org/horizon/context/EntryLookup.java
core/branches/flat/src/main/java/org/horizon/context/InvocationContext.java
core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java
core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java
core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java
core/branches/flat/src/main/java/org/horizon/eviction/DefaultEvictionAction.java
core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionAction.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithmConfigBase.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManager.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManagerImpl.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionEvent.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionException.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionManagerImpl.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/EvictionTimerTask.java
core/branches/flat/src/main/java/org/horizon/eviction/ExpirationAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/KeyEntry.java
core/branches/flat/src/main/java/org/horizon/eviction/RegionNameConflictException.java
core/branches/flat/src/main/java/org/horizon/eviction/RemoveOnEvictActionPolicy.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseEvictionAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseSortedEvictionAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ElementSizeAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ExpirationAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/SortedEvictionQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUQueue.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionListEntry.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionQueueList.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithm.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithmConfig.java
core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUQueue.java
core/branches/flat/src/main/java/org/horizon/executors/DefaultExecutorFactory.java
core/branches/flat/src/main/java/org/horizon/executors/DefaultScheduledExecutorFactory.java
core/branches/flat/src/main/java/org/horizon/executors/ExecutorFactory.java
core/branches/flat/src/main/java/org/horizon/executors/ScheduledExecutorFactory.java
core/branches/flat/src/main/java/org/horizon/factories/AbstractComponentRegistry.java
core/branches/flat/src/main/java/org/horizon/factories/BootstrapFactory.java
core/branches/flat/src/main/java/org/horizon/factories/ComponentFactory.java
core/branches/flat/src/main/java/org/horizon/factories/ComponentRegistry.java
core/branches/flat/src/main/java/org/horizon/factories/DataContainerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/DefaultCacheFactory.java
core/branches/flat/src/main/java/org/horizon/factories/EmptyConstructorFactory.java
core/branches/flat/src/main/java/org/horizon/factories/EntryFactory.java
core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
core/branches/flat/src/main/java/org/horizon/factories/EvictionManagerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/GlobalComponentRegistry.java
core/branches/flat/src/main/java/org/horizon/factories/InterceptorChainFactory.java
core/branches/flat/src/main/java/org/horizon/factories/LockManagerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/ReplicationQueueFactory.java
core/branches/flat/src/main/java/org/horizon/factories/RuntimeConfigAwareFactory.java
core/branches/flat/src/main/java/org/horizon/factories/StateTransferFactory.java
core/branches/flat/src/main/java/org/horizon/factories/StateTransferManagerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/TransactionManagerFactory.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/DefaultFactoryFor.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/Destroy.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/Inject.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/NonVolatile.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/Start.java
core/branches/flat/src/main/java/org/horizon/factories/annotations/Stop.java
core/branches/flat/src/main/java/org/horizon/factories/context/ContextFactory.java
core/branches/flat/src/main/java/org/horizon/factories/scopes/Scope.java
core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetector.java
core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java
core/branches/flat/src/main/java/org/horizon/interceptors/BaseTransactionalContextInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/BatchingInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/CacheMgmtInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/CacheStoreInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/CallInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/EvictionInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java
core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/InvocationContextInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/LockingInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/MarshalledValueInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/ReplicationInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/TxInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/base/BaseRpcInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/base/CommandInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/base/JmxStatsCommandInterceptor.java
core/branches/flat/src/main/java/org/horizon/interceptors/base/PrePostProcessingCommandInterceptor.java
core/branches/flat/src/main/java/org/horizon/invocation/InvocationContextContainer.java
core/branches/flat/src/main/java/org/horizon/io/ByteBuffer.java
core/branches/flat/src/main/java/org/horizon/io/ExposedByteArrayOutputStream.java
core/branches/flat/src/main/java/org/horizon/jmx/JmxRegistrationManager.java
core/branches/flat/src/main/java/org/horizon/jmx/JmxStatisticsExposer.java
core/branches/flat/src/main/java/org/horizon/jmx/PlatformMBeanServerRegistration.java
core/branches/flat/src/main/java/org/horizon/jmx/ResourceDMBean.java
core/branches/flat/src/main/java/org/horizon/jmx/annotations/MBean.java
core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedAttribute.java
core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedOperation.java
core/branches/flat/src/main/java/org/horizon/lifecycle/Lifecycle.java
core/branches/flat/src/main/java/org/horizon/loader/AbstractCacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/AbstractDelegatingCacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoaderConfig.java
core/branches/flat/src/main/java/org/horizon/loader/CacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java
core/branches/flat/src/main/java/org/horizon/loader/ChainingCacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoader.java
core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoaderConfig.java
core/branches/flat/src/main/java/org/horizon/loader/Modification.java
core/branches/flat/src/main/java/org/horizon/loader/ReadOnlyDelegatingCacheLoader.java
core/branches/flat/src/main/java/org/horizon/lock/LockManager.java
core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java
core/branches/flat/src/main/java/org/horizon/lock/StripedLockManager.java
core/branches/flat/src/main/java/org/horizon/lock/TimeoutException.java
core/branches/flat/src/main/java/org/horizon/manager/CacheManager.java
core/branches/flat/src/main/java/org/horizon/manager/CacheNameExistsException.java
core/branches/flat/src/main/java/org/horizon/manager/NamedCacheNotFoundException.java
core/branches/flat/src/main/java/org/horizon/marshall/CacheMarshallerStarobrno.java
core/branches/flat/src/main/java/org/horizon/marshall/CommandAwareRpcDispatcher.java
core/branches/flat/src/main/java/org/horizon/marshall/EntryData.java
core/branches/flat/src/main/java/org/horizon/marshall/EntryDataExceptionMarker.java
core/branches/flat/src/main/java/org/horizon/marshall/EntryDataMarker.java
core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValue.java
core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueHelper.java
core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueMap.java
core/branches/flat/src/main/java/org/horizon/marshall/NodeData.java
core/branches/flat/src/main/java/org/horizon/marshall/NodeDataExceptionMarker.java
core/branches/flat/src/main/java/org/horizon/marshall/NodeDataMarker.java
core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java
core/branches/flat/src/main/java/org/horizon/marshall/VersionAwareMarshaller.java
core/branches/flat/src/main/java/org/horizon/notifications/IncorrectCacheListenerException.java
core/branches/flat/src/main/java/org/horizon/notifications/Notifier.java
core/branches/flat/src/main/java/org/horizon/notifications/NotifierImpl.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryActivated.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryCreated.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryEvicted.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryInvalidated.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryLoaded.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryModified.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryPassivated.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryRemoved.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryVisited.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheListener.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStarted.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStopped.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionCompleted.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionRegistered.java
core/branches/flat/src/main/java/org/horizon/notifications/annotation/ViewChanged.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryActivatedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryCreatedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvictedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryInvalidatedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryLoadedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryModifiedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryPassivatedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryRemovedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryVisitedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStartedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStoppedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/Event.java
core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java
core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionCompletedEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionRegisteredEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionalEvent.java
core/branches/flat/src/main/java/org/horizon/notifications/event/ViewChangedEvent.java
core/branches/flat/src/main/java/org/horizon/remoting/ChannelMessageListener.java
core/branches/flat/src/main/java/org/horizon/remoting/RPCManager.java
core/branches/flat/src/main/java/org/horizon/remoting/RPCManagerImpl.java
core/branches/flat/src/main/java/org/horizon/remoting/ReplicationException.java
core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java
core/branches/flat/src/main/java/org/horizon/remoting/transport/Address.java
core/branches/flat/src/main/java/org/horizon/remoting/transport/Transport.java
core/branches/flat/src/main/java/org/horizon/statetransfer/DefaultStateTransferManager.java
core/branches/flat/src/main/java/org/horizon/statetransfer/StateTransferManager.java
core/branches/flat/src/main/java/org/horizon/transaction/BatchModeTransactionManager.java
core/branches/flat/src/main/java/org/horizon/transaction/DummyBaseTransactionManager.java
core/branches/flat/src/main/java/org/horizon/transaction/DummyTransaction.java
core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManager.java
core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManagerLookup.java
core/branches/flat/src/main/java/org/horizon/transaction/DummyUserTransaction.java
core/branches/flat/src/main/java/org/horizon/transaction/GenericTransactionManagerLookup.java
core/branches/flat/src/main/java/org/horizon/transaction/GlobalTransaction.java
core/branches/flat/src/main/java/org/horizon/transaction/JBossStandaloneJTAManagerLookup.java
core/branches/flat/src/main/java/org/horizon/transaction/JBossTransactionManagerLookup.java
core/branches/flat/src/main/java/org/horizon/transaction/TransactionManagerLookup.java
core/branches/flat/src/main/java/org/horizon/transaction/TransactionTable.java
core/branches/flat/src/main/java/org/horizon/tree/Fqn.java
core/branches/flat/src/main/java/org/horizon/tree/FqnComparator.java
core/branches/flat/src/main/java/org/horizon/tree/Node.java
core/branches/flat/src/main/java/org/horizon/tree/NodeImpl.java
core/branches/flat/src/main/java/org/horizon/tree/NodeKey.java
core/branches/flat/src/main/java/org/horizon/tree/TreeCache.java
core/branches/flat/src/main/java/org/horizon/tree/TreeCacheImpl.java
core/branches/flat/src/main/java/org/horizon/tree/TreeStructureSupport.java
core/branches/flat/src/main/java/org/horizon/util/BeanUtils.java
core/branches/flat/src/main/java/org/horizon/util/FastCopyHashMap.java
core/branches/flat/src/main/java/org/horizon/util/FileLookup.java
core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java
core/branches/flat/src/main/java/org/horizon/util/Immutables.java
core/branches/flat/src/main/java/org/horizon/util/ObjectDuplicator.java
core/branches/flat/src/main/java/org/horizon/util/ReflectionUtil.java
core/branches/flat/src/main/java/org/horizon/util/SimpleImmutableEntry.java
core/branches/flat/src/main/java/org/horizon/util/TypedProperties.java
core/branches/flat/src/main/java/org/horizon/util/Util.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/BoundedExecutors.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/ConcurrentHashSet.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/ReclosableLatch.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/SelfInitializingConcurrentHashMap.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/SynchronizedRestarter.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/WithinThreadExecutor.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/LockContainer.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLock.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLockContainer.java
core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/ReentrantLockContainer.java
core/branches/flat/src/main/java/org/horizon/util/internals/ReplicationListener.java
core/branches/flat/src/main/java/org/horizon/util/internals/ViewChangeListener.java
core/branches/flat/src/main/resources/config-samples/all.xml
core/branches/flat/src/main/resources/config-samples/buddy-replication.xml
core/branches/flat/src/main/resources/config-samples/cacheloader-enabled.xml
core/branches/flat/src/main/resources/config-samples/eviction-enabled.xml
core/branches/flat/src/main/resources/config-samples/external-jgroups-file.xml
core/branches/flat/src/main/resources/config-samples/invalidation-async.xml
core/branches/flat/src/main/resources/config-samples/local.xml
core/branches/flat/src/main/resources/config-samples/multiplexer-enabled.xml
core/branches/flat/src/main/resources/config-samples/total-replication.xml
core/branches/flat/src/test/java/org/jboss/starobrno/BasicTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java
core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/AbstractBatchTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockAssert.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/PutForExternalReadTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/CacheAPIMVCCTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/ReadCommittedLockTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/CacheAPIMVCCTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeAPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeLockSupport.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeMoveAPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeReplicatedMoveTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTxTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeCacheAPITest.java
core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeStructureHashCodeTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/TreeProfileTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/profiling/testinternals/Generator.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java
core/branches/flat/src/test/resources/configs/buddy-replication-cache.xml
core/branches/flat/src/test/resources/configs/clonable-config.xml
core/branches/flat/src/test/resources/configs/local-lru-eviction.xml
core/branches/flat/src/test/resources/configs/local-passivation.xml
core/branches/flat/src/test/resources/configs/local-tx.xml
core/branches/flat/src/test/resources/configs/mixedPolicy-eviction.xml
core/branches/flat/src/test/resources/configs/mux.xml
core/branches/flat/src/test/resources/configs/mvcc-repl-sync-br.xml
core/branches/flat/src/test/resources/configs/named-cache-test.xml
core/branches/flat/src/test/resources/configs/parser-test-async.xml
core/branches/flat/src/test/resources/configs/parser-test.xml
core/branches/flat/src/test/resources/configs/policyPerRegion-eviction.xml
core/branches/flat/src/test/resources/configs/replSync.xml
core/branches/flat/src/test/resources/jbc3-registry-configs.xml
core/branches/flat/src/test/resources/unit-test-cache-service.xml
Log:
Moved stuff around
Modified: core/branches/flat/pom.xml
===================================================================
--- core/branches/flat/pom.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/pom.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -137,7 +137,7 @@
<properties>
<property>
<name>listener</name>
- <value>org.jboss.starobrno.util.UnitTestTestNGListener</value>
+ <value>org.horizon.util.UnitTestTestNGListener</value>
</property>
</properties>
</configuration>
@@ -174,7 +174,7 @@
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
- <mainClass>org.jboss.cache.Version</mainClass>
+ <mainClass>org.horizon.Version</mainClass>
</manifest>
</archive>
</configuration>
Modified: core/branches/flat/src/main/docbook/faq/en/master.xml
===================================================================
--- core/branches/flat/src/main/docbook/faq/en/master.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/faq/en/master.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -774,7 +774,7 @@
compliant such as JBossTM or JBossTS. JBoss Cache ships with a
dummy transaction manager
(
- <literal>org.jboss.starobrno.transaction.DummyTransactionManager</literal>
+ <literal>org.horizon.transaction.DummyTransactionManager</literal>
) for
testing purposes only. But note that
<literal>DummyTransactionManager</literal>
@@ -793,7 +793,7 @@
<answer>
<para>You either use the default transaction manager that ships with JBoss AS
or you have to implement the
- <literal>org.jboss.starobrno.transaction.TransactionManagerLookup</literal>
+ <literal>org.horizon.transaction.TransactionManagerLookup</literal>
interface, and return an
instance of your
<literal>javax.transaction.TransactionManager</literal>
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/basic_api.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/basic_api.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/basic_api.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -664,7 +664,7 @@
</footnote>
</listitem>
<listitem>
- <literal>org.jboss.cache.loader.ClusteredCacheLoader</literal>
+ <literal>org.horizon.loader.ClusteredCacheLoader</literal>
- used as a "read-only" CacheLoader, where other nodes in the cluster are queried for state.
</listitem>
</itemizedlist>
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/cache_loaders.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/cache_loaders.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/cache_loaders.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -147,7 +147,7 @@
details.
</para>
- <programlisting role="XML"><![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[
...
<!-- Cache loader config block -->
@@ -197,8 +197,8 @@
<!-- implementation class for singleton store functionality which must extend
org.jboss.cache.loader.AbstractDelegatingCacheLoader. Default implementation
- is org.jboss.cache.loader.SingletonStoreCacheLoader -->
- <class>org.jboss.cache.loader.SingletonStoreCacheLoader</class>
+ org.horizon.loader.SingletonStoreCacheLoadercheLoader -->
+ <class>org.horizon.loader.SingletonStoreCacheLoader</class>
<!-- properties and default values for the default singleton store functionality
implementation -->
@@ -211,7 +211,7 @@
</config>
</attribute>
-]]></programlisting>
+]]>]]>]]></programlisting>
<para>The
<literal>class</literal>
@@ -377,7 +377,7 @@
singleton store functionality. This class must extend
<literal>org.jboss.cache.loader.AbstractDelegatingCacheLoader</literal>
, and if absent, it defaults to
- <literal>org.jboss.cache.loader.SingletonStoreCacheLoader</literal>
+ <literal>org.horizon.loader.SingletonStoreCacheLoader</literal>
.
</para>
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/configuration.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/configuration.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/configuration.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -64,7 +64,7 @@
<para>
Here is a simple example configuration file:
</para>
- <programlisting role="XML"><![CDATA[<![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
@@ -75,11 +75,11 @@
<server>
- <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
+ <mbean code="org.horizon.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
<!-- Configure the TransactionManager -->
<attribute name="TransactionManagerLookupClass">
- org.jboss.starobrno.transaction.GenericTransactionManagerLookup
+ org.horizon.transaction.GenericTransactionManagerLookup
</attribute>
<!-- Node locking level : SERIALIZABLE
@@ -119,7 +119,7 @@
</mbean>
</server>
]]>]]>
- </programlisting>
+ ]]>]]></programlisting>
<para>
Another, more complete, sample XML file is included in the
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/configuration_reference.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/configuration_reference.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/configuration_reference.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -8,7 +8,7 @@
shipped with the JBoss Cache distribution and tweak according to your needs rather than write one from
scratch.
</para>
- <programlisting role="XML"><![CDATA[<![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
@@ -24,7 +24,7 @@
<!-- ==================================================================== -->
<!-- Note the value of the 'code' attribute has changed since JBC 1.x -->
- <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
+ <mbean code="org.horizon.jmx.CacheJmxWrapper" name="jboss.cache:service=Cache">
<!-- Ensure JNDI and the TransactionManager are started before the
cache. Only works inside JBoss AS; ignored otherwise -->
@@ -33,7 +33,7 @@
<!-- Configure the TransactionManager -->
<attribute name="TransactionManagerLookupClass">
- org.jboss.starobrno.transaction.GenericTransactionManagerLookup
+ org.horizon.transaction.GenericTransactionManagerLookup
</attribute>
<!-- Node locking level : SERIALIZABLE
@@ -158,7 +158,7 @@
</mbean>
</server>
]]>]]>
- </programlisting>
+ ]]>]]></programlisting>
</section>
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/deployment.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/deployment.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/deployment.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -88,7 +88,7 @@
element's
<literal>code</literal>
attribute:
- <literal>org.jboss.cache.jmx.CacheJmxWrapper</literal>
+ <literal>org.horizon.jmx.CacheJmxWrapper</literal>
. This is the
class JBoss Cache uses to handle JMX integration; the
<literal>Cache</literal>
@@ -191,7 +191,7 @@
installation, you can find several more examples.
</para>
- <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
@@ -280,7 +280,7 @@
</bean>
<!-- Factory to build the Cache. -->
- <bean name="DefaultCacheFactory" class="org.jboss.starobrno.factories.DefaultCacheFactory">
+ <bean name="DefaultCacheFactory" class="org.horizon.factories.DefaultCacheFactory">
<conorg.jboss.starobrno.factories.DefaultCacheFactoryche.DefaultCacheFactory"
factoryMethod="getInstance"/>
</bean>
@@ -298,7 +298,7 @@
</deployment>
]]>]]>]]>
- </programlisting>
+ ]]></programlisting>
<para>
See the JBoss Microcontainer documentation
@@ -364,10 +364,10 @@
<para>
JBoss Cache provides an MBean that can be registered with your environments JMX server to allow access
to the cache instance via JMX. This MBean is the
- <literal>org.jboss.cache.jmx.CacheJmxWrapper</literal>
+ <literal>org.horizon.jmx.CacheJmxWrapper</literal>
.
It is a StandardMBean, so it's MBean interface is
- <literal>org.jboss.cache.jmx.CacheJmxWrapperMBean</literal>
+ <literal>org.horizon.jmx.CacheJmxWrapperMBean</literal>
.
This MBean can be used to:
<itemizedlist>
@@ -547,7 +547,7 @@
bean:
</para>
- <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[<![CDATA[<![CDATA[<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
@@ -562,7 +562,7 @@
<!-- Factory to build the Cache. -->
<bean name="DefaultCacheFactoryorg.jboss.starobrno.factories.DefaultCacheFactoryheFactory">
- <constructor factoryClass="org.jboss.starobrno.factories.DefaultCacheFactory"
+ <constructor factoryClass="org.horizon.factories.DefaultCacheFactory"
factoryMethod="getInstance"/>
</bean>
@@ -578,10 +578,10 @@
</bean>
<!-- JMX Management -->
- <bean name="ExampleCacheJmxWrapper" class="org.jboss.cache.jmx.CacheJmxWrapper">
+ <bean name="ExampleCacheJmxWrapperorg.horizon.jmxcache.jmx.CacheJmxWrapper">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=ExampleTreeCache",
- exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class,
+ exposedInterface=org.horizon.jmx.CacheJmxWrapperMBean.class,
registerDirectly=true)</annotation>
<constructor>
@@ -592,7 +592,7 @@
</deployment>
]]>]]>]]>
- </programlisting>
+ ]]>]]>]]></programlisting>
<para>
As discussed in the
@@ -612,7 +612,7 @@
:
</para>
- <programlisting role="XML"><![CDATA[
+ <programlisting role="XML"><![CDATA[<![CDATA[<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
@@ -620,25 +620,25 @@
<!-- First we create a Configuration object for the cache -->
<bean name="ExampleCacheConfig"
class="org.jboss.cache.config.Configuration">
-
+
... build up the Configuration
-
+
</bean>
-
- <bean name="ExampleCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
-
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=ExampleTreeCache",
- exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class,
+
+ <bean name="ExampleCacheorg.horizon.jmxcache.jmx.CacheJmxWrapper">
+
+ <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=ExampleTreeCache",
+ exposedInterface=org.horizon.jmx.CacheJmxWrapperMBean.class,
registerDirectly=true)</annotation>
-
+
<constructor>
<parameter><inject bean="ExampleCacheConfig"/></parameter>
</constructor>
-
+
</bean>
-</deployment>
-]]></programlisting>
+</deployment>
+]]>]]>]]></programlisting>
</section>
</section>
Modified: core/branches/flat/src/main/docbook/userguide/en/modules/eviction_policies.xml
===================================================================
--- core/branches/flat/src/main/docbook/userguide/en/modules/eviction_policies.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/docbook/userguide/en/modules/eviction_policies.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -516,10 +516,10 @@
<literal>org.jboss.cache.eviction.EvictionPolicy</literal>
</listitem>
<listitem>
- <literal>org.jboss.starobrno.eviction.EvictionAlgorithm</literal>
+ <literal>org.horizon.eviction.EvictionAlgorithm</literal>
</listitem>
<listitem>
- <literal>org.jboss.starobrno.eviction.EvictionQueue</literal>
+ <literal>org.horizon.eviction.EvictionQueue</literal>
</listitem>
<listitem>
<literal>org.jboss.cache.config.EvictionPolicyConfig</literal>
Copied: core/branches/flat/src/main/java/org/horizon/Cache.java (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/Cache.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/Cache.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/Cache.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon;
+
+import org.horizon.CacheStatus;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.lifecycle.Lifecycle;
+import org.jgroups.Address;
+
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Mircea.Markus at jboss.com
+ */
+public interface Cache<K, V> extends ConcurrentMap<K, V>, Lifecycle
+{
+ /**
+ * Under special operating behavior, associates the value with the specified key.
+ * <ul>
+ * <li> Only goes through if the key specified does not exist; no-op otherwise (similar to {@link java.util.concurrent.ConcurrentMap#putIfAbsent(Object, Object)})</i>
+ * <li> Force asynchronous mode for replication to prevent any blocking.</li>
+ * <li> invalidation does not take place. </li>
+ * <li> 0ms lock timeout to prevent any blocking here either. If the lock is not acquired, this method is a no-op, and swallows the timeout exception.</li>
+ * <li> Ongoing transactions are suspended before this call, so failures here will not affect any ongoing transactions.</li>
+ * <li> Errors and exceptions are 'silent' - logged at a much lower level than normal, and this method does not throw exceptions</li>
+ * </ul>
+ * This method is for caching data that has an external representation in storage, where, concurrent modification and
+ * transactions are not a consideration, and failure to put the data in the cache should be treated as a 'suboptimal outcome'
+ * rather than a 'failing outcome'.
+ * <p/>
+ * An example of when this method is useful is when data is read from, for example, a legacy datastore, and is cached before
+ * returning the data to the caller. Subsequent calls would prefer to get the data from the cache and if the data doesn't exist
+ * in the cache, fetch again from the legacy datastore.
+ * <p/>
+ * See <a href="http://jira.jboss.com/jira/browse/JBCACHE-848">JBCACHE-848</a> for details around this feature.
+ * <p/>
+ *
+ * @param key key with which the specified value is to be associated.
+ * @param value value to be associated with the specified key.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ */
+ void putForExternalRead(K key, V value);
+
+ void evict(K key);
+
+ Configuration getConfiguration();
+
+ void addCacheListener(Object listener);
+
+ void removeCacheListener(Object listener);
+
+ Set<Object> getCacheListeners();
+
+ InvocationContext getInvocationContext();
+
+ void setInvocationContext(InvocationContext ctx);
+
+ CacheStatus getCacheStatus();
+
+ /**
+ * @return true if a batch was successfully started; false if one was available and already running.
+ */
+ public boolean startBatch();
+
+ public void endBatch(boolean successful);
+
+ List<Address> getMembers();
+
+ String getName();
+
+ Address getLocalAddress();
+
+ String getVersion();
+
+ void addInterceptor(CommandInterceptor i, int position);
+
+ void addInterceptor(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor);
+
+ void removeInterceptor(int position);
+
+ void removeInterceptor(Class<? extends CommandInterceptor> interceptorType);
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/Cache.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: core/branches/flat/src/main/java/org/horizon/CacheDelegate.java (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/CacheDelegate.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/CacheDelegate.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,469 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.horizon.atomic.AtomicHashMap;
+import org.horizon.atomic.AtomicMap;
+import org.horizon.atomic.AtomicMapCache;
+import org.horizon.batch.BatchContainer;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.container.DataContainer;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.lock.LockManager;
+import org.horizon.marshall.Marshaller;
+import org.horizon.notifications.Notifier;
+import org.horizon.remoting.RPCManager;
+import org.horizon.statetransfer.StateTransferManager;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
+import org.jgroups.Address;
+
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Mircea.Markus at jboss.com
+ */
+ at NonVolatile
+public class CacheDelegate<K, V> implements CacheSPI<K, V>, AtomicMapCache<K, V>
+{
+ protected InvocationContextContainer invocationContextContainer;
+ protected CommandsFactory commandsFactory;
+ protected InterceptorChain invoker;
+ protected Configuration config;
+ protected Notifier notifier;
+ protected BatchContainer batchContainer;
+ protected ComponentRegistry componentRegistry;
+ protected TransactionManager transactionManager;
+ protected RPCManager rpcManager;
+ protected Marshaller marshaller;
+ private String name;
+ private EvictionManager evictionManager;
+ private DataContainer dataContainer;
+ private LockManager lockManager;
+ private static final Log log = LogFactory.getLog(CacheDelegate.class);
+
+ public CacheDelegate(String name)
+ {
+ this.name = name;
+ }
+
+ @Inject
+ private void injectDependencies(EvictionManager evictionManager,
+ InvocationContextContainer invocationContextContainer,
+ CommandsFactory commandsFactory,
+ InterceptorChain interceptorChain,
+ Configuration configuration,
+ Notifier notifier,
+ ComponentRegistry componentRegistry,
+ TransactionManager transactionManager,
+ BatchContainer batchContainer,
+ RPCManager rpcManager, DataContainer dataContainer,
+ Marshaller marshaller,
+ LockManager lockManager)
+ {
+ this.invocationContextContainer = invocationContextContainer;
+ this.commandsFactory = commandsFactory;
+ this.invoker = interceptorChain;
+ this.config = configuration;
+ this.notifier = notifier;
+ this.componentRegistry = componentRegistry;
+ this.transactionManager = transactionManager;
+ this.batchContainer = batchContainer;
+ this.rpcManager = rpcManager;
+ this.evictionManager = evictionManager;
+ this.dataContainer = dataContainer;
+ this.marshaller = marshaller;
+ this.lockManager = lockManager;
+ }
+
+ public V putIfAbsent(K key, V value)
+ {
+ PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(key, value);
+ command.setPutIfAbsent(true);
+ return (V) invoker.invoke(buildCtx(), command);
+ }
+
+ public boolean remove(Object key, Object value)
+ {
+ RemoveCommand command = commandsFactory.buildRemoveCommand(key, value);
+ return (Boolean) invoker.invoke(buildCtx(), command);
+ }
+
+ public boolean replace(K key, V oldValue, V newValue)
+ {
+ ReplaceCommand command = commandsFactory.buildReplaceCommand(key, oldValue, newValue);
+ return (Boolean) invoker.invoke(buildCtx(), command);
+ }
+
+ public V replace(K key, V value)
+ {
+ ReplaceCommand command = commandsFactory.buildReplaceCommand(key, null, value);
+ return (V) invoker.invoke(buildCtx(), command);
+ }
+
+ public int size()
+ {
+ SizeCommand command = commandsFactory.buildSizeCommand();
+ return (Integer) invoker.invoke(buildCtx(), command);
+ }
+
+ public boolean isEmpty()
+ {
+ SizeCommand command = commandsFactory.buildSizeCommand();
+ int size = (Integer) invoker.invoke(buildCtx(), command);
+ return size == 0;
+ }
+
+ public boolean containsKey(Object key)
+ {
+ GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key);
+ Object response = invoker.invoke(buildCtx(), command);
+ return response != null;
+ }
+
+ public boolean containsValue(Object value)
+ {
+ throw new UnsupportedOperationException("Go away");
+ }
+
+ public V get(Object key)
+ {
+ GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key);
+ return (V) invoker.invoke(buildCtx(), command);
+ }
+
+ public V put(K key, V value)
+ {
+ PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(key, value);
+ return (V) invoker.invoke(buildCtx(), command);
+ }
+
+ public V remove(Object key)
+ {
+ RemoveCommand command = commandsFactory.buildRemoveCommand(key, null);
+ V oldval = (V) invoker.invoke(buildCtx(), command);
+ return oldval;
+ }
+
+ public void putAll(Map<? extends K, ? extends V> t)
+ {
+ PutMapCommand command = commandsFactory.buildPutMapCommand(t);
+ invoker.invoke(buildCtx(), command);
+ }
+
+ public void clear()
+ {
+ ClearCommand command = commandsFactory.buildClearCommand();
+ invoker.invoke(buildCtx(), command);
+ }
+
+ public Set keySet()
+ {
+ throw new UnsupportedOperationException("Go away");
+ }
+
+ public Collection values()
+ {
+ throw new UnsupportedOperationException("Go away");
+ }
+
+ public Set entrySet()
+ {
+ throw new UnsupportedOperationException("Go away");
+ }
+
+ public void putForExternalRead(K key, V value)
+ {
+ InvocationContext ctx = invocationContextContainer.get();
+ Transaction ongoingTransaction = null;
+ try
+ {
+ if (transactionManager != null && (ongoingTransaction = transactionManager.getTransaction()) != null)
+ {
+ transactionManager.suspend();
+ }
+
+ // if the node exists then this should be a no-op.
+ ctx.getOptionOverrides().setFailSilently(true);
+ ctx.getOptionOverrides().setForceAsynchronous(true);
+ ctx.getOptionOverrides().setLockAcquisitionTimeout(0);
+ putIfAbsent(key, value);
+ }
+ catch (Exception e)
+ {
+ if (log.isDebugEnabled()) log.debug("Caught exception while doing putForExternalRead()", e);
+ }
+ finally
+ {
+ try
+ {
+ if (ongoingTransaction != null) transactionManager.resume(ongoingTransaction);
+ }
+ catch (Exception e)
+ {
+ log.debug("Had problems trying to resume a transaction after putForExternalread()", e);
+ }
+ }
+ }
+
+ public void evict(K key)
+ {
+ EvictCommand command = commandsFactory.buildEvictCommand(key);
+ invoker.invoke(buildCtx(), command);
+ }
+
+ public Configuration getConfiguration()
+ {
+ return config;
+ }
+
+ public void addCacheListener(Object listener)
+ {
+ notifier.addCacheListener(listener);
+ }
+
+ public void removeCacheListener(Object listener)
+ {
+ notifier.removeCacheListener(listener);
+ }
+
+ public Set getCacheListeners()
+ {
+ return notifier.getCacheListeners();
+ }
+
+ public InvocationContext getInvocationContext()
+ {
+ return invocationContextContainer.get();
+ }
+
+ public void setInvocationContext(InvocationContext ctx)
+ {
+ if (ctx == null) invocationContextContainer.remove();
+ else invocationContextContainer.set(ctx);
+ }
+
+ public void start()
+ {
+ componentRegistry.start();
+ }
+
+ public void stop()
+ {
+ componentRegistry.stop();
+ if (config.isUsingEviction())
+ {
+ evictionManager.cacheStopped(getName());
+ }
+ }
+
+ private InvocationContext buildCtx()
+ {
+ return invocationContextContainer.get();
+ }
+
+ public TransactionManager getTransactionManager()
+ {
+ return transactionManager;
+ }
+
+ public List<CommandInterceptor> getInterceptorChain()
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public Marshaller getMarshaller()
+ {
+ return marshaller;
+ }
+
+ public void addInterceptor(CommandInterceptor i, int position)
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public void addInterceptor(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor)
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public void removeInterceptor(int position)
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public void removeInterceptor(Class<? extends CommandInterceptor> interceptorType)
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public CacheLoaderManager getCacheLoaderManager()
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public TransactionTable getTransactionTable()
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public EvictionManager getEvictionManager()
+ {
+ return evictionManager;
+ }
+
+ public RPCManager getRPCManager()
+ {
+ return rpcManager;
+ }
+
+ public StateTransferManager getStateTransferManager()
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public Notifier getNotifier()
+ {
+ return notifier;
+ }
+
+ public String getClusterName()
+ {
+ return config.getClusterName();
+ }
+
+ public GlobalTransaction getCurrentTransaction(Transaction tx, boolean createIfNotExists)
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public GlobalTransaction getCurrentTransaction()
+ {
+ throw new IllegalStateException();//todo Implement me properly
+ }
+
+ public ComponentRegistry getComponentRegistry()
+ {
+ return componentRegistry;
+ }
+
+ public CacheStatus getCacheStatus()
+ {
+ return componentRegistry.getState();
+ }
+
+ public boolean startBatch()
+ {
+ if (!config.isInvocationBatchingEnabled())
+ throw new ConfigurationException("Invocation batching not enabled in current configuration! Please use the <invocationBatching /> element.");
+ return batchContainer.startBatch();
+ }
+
+ public void endBatch(boolean successful)
+ {
+ if (!config.isInvocationBatchingEnabled())
+ throw new ConfigurationException("Invocation batching not enabled in current configuration! Please use the <invocationBatching /> element.");
+ batchContainer.endBatch(successful);
+ }
+
+ public List<Address> getMembers()
+ {
+ return rpcManager.getMembers();
+ }
+
+ public Object getDirect(Object key)
+ {
+ throw new UnsupportedOperationException("Not implemented");//todo please implement!
+ }
+
+ public LockManager getLockManager()
+ {
+ return lockManager;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getVersion()
+ {
+ return Version.decodeVersion(Version.getVersionShort());
+ }
+
+ public Address getLocalAddress()
+ {
+ return rpcManager.getLocalAddress();
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return dataContainer == null ? super.toString() : dataContainer.toString();
+ }
+
+ public AtomicMap getAtomicMap(K key) throws ClassCastException
+ {
+ Object value = get(key);
+ if (value == null) value = AtomicHashMap.newInstance(this, key);
+ return ((AtomicHashMap) value).getProxy(this, key);
+ }
+
+ public <AMK, AMV> AtomicMap<AMK, AMV> getAtomicMap(K key, Class<AMK> atomicMapKeyType, Class<AMV> atomicMapValueType) throws ClassCastException
+ {
+ return getAtomicMap(key);
+ }
+
+ public BatchContainer getBatchContainer()
+ {
+ return batchContainer;
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/CacheDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: core/branches/flat/src/main/java/org/horizon/CacheException.java (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/CacheException.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/CacheException.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/CacheException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon;
+
+/**
+ * Thrown when operations on {@link Cache} fail unexpectedly.
+ * <p/>
+ * Specific subclasses such as {@link org.horizon.lock.TimeoutException} and {@link org.horizon.config.ConfigurationException}
+ * have more specific uses.
+ *
+ * @author <a href="mailto:bela at jboss.org">Bela Ban</a>
+ * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
+ */
+public class CacheException extends RuntimeException
+{
+
+ private static final long serialVersionUID = -4386393072593859164L;
+
+ public CacheException()
+ {
+ super();
+ }
+
+ public CacheException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public CacheException(String msg)
+ {
+ super(msg);
+ }
+
+ public CacheException(String msg, Throwable cause)
+ {
+ super(msg, cause);
+ }
+}
\ No newline at end of file
Property changes on: core/branches/flat/src/main/java/org/horizon/CacheException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: core/branches/flat/src/main/java/org/horizon/CacheSPI.java (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/CacheSPI.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/CacheSPI.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/CacheSPI.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,187 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon;
+
+import net.jcip.annotations.ThreadSafe;
+import org.horizon.batch.BatchContainer;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.loader.CacheLoader;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.lock.LockManager;
+import org.horizon.marshall.Marshaller;
+import org.horizon.notifications.Notifier;
+import org.horizon.remoting.RPCManager;
+import org.horizon.statetransfer.StateTransferManager;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
+
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+import java.util.List;
+
+/**
+ * A more detailed interface to {@link Cache}, which is used when writing plugins for or extending JBoss Cache. A reference
+ * to this interface should only be obtained when it is passed in to your code, for example when you write an
+ * {@link org.horizon.interceptors.base.CommandInterceptor} or {@link CacheLoader}.
+ * <p/>
+ * <B><I>You should NEVER attempt to directly cast a {@link Cache} instance to this interface. In future, the implementation may not allow it.</I></B>
+ * <p/>
+ *
+ * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
+ * @see Cache
+ * @see CacheLoader
+ * @since 2.0.0
+ */
+ at ThreadSafe
+public interface CacheSPI<K, V> extends Cache<K, V>
+{
+ /**
+ * Retrieves a reference to a running {@link javax.transaction.TransactionManager}, if one is configured.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return a TransactionManager
+ */
+ TransactionManager getTransactionManager();
+
+ /**
+ * Retrieves the current Interceptor chain.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return an immutable {@link List} of {@link org.horizon.interceptors.base.CommandInterceptor}s configured for
+ * this cache
+ */
+ List<CommandInterceptor> getInterceptorChain();
+
+ /**
+ * Retrieves an instance of a {@link Marshaller}, which is capable of
+ * converting Java objects to bytestreams and back in an efficient manner, which is
+ * also interoperable with bytestreams produced/consumed by other versions of JBoss
+ * Cache.
+ * <p/>
+ * The use of this marshaller is the <b>recommended</b> way of creating efficient,
+ * compatible, byte streams from objects.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return an instance of {@link Marshaller}
+ */
+ Marshaller getMarshaller();
+
+ /**
+ * Retrieves the current CacheCacheLoaderManager instance associated with the current Cache instance.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return Retrieves a reference to the currently configured {@link CacheLoaderManager} if one or more cache loaders are configured, null otherwise.
+ */
+ CacheLoaderManager getCacheLoaderManager();
+
+ /**
+ * Retrieves the current TransactionTable instance associated with the current Cache instance.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return the current {@link TransactionTable}
+ */
+ TransactionTable getTransactionTable();
+
+
+ EvictionManager getEvictionManager();
+
+ /**
+ * Gets a handle of the RPC manager.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return the {@link RPCManager} configured.
+ */
+ RPCManager getRPCManager();
+
+ /**
+ * Retrieves the current StateTransferManager instance associated with the current Cache instance.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return the current {@link org.horizon.statetransfer.StateTransferManager}
+ */
+ StateTransferManager getStateTransferManager();
+
+ /**
+ * Retrieves the current Notifier instance associated with the current Cache instance.
+ * <p/>
+ * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
+ * {@link org.horizon.factories.annotations.Inject} annotation.
+ *
+ * @return the notifier attached with this instance of the cache. See {@link org.horizon.notifications.Notifier}, a class
+ * that is responsible for emitting notifications to registered CacheListeners.
+ */
+ Notifier getNotifier();
+
+ /**
+ * @return the name of the cluster. Null if running in local mode.
+ */
+ String getClusterName();
+
+ /**
+ * Returns the global transaction for this local transaction.
+ * Optionally creates a new global transaction if it does not exist.
+ *
+ * @param tx the current transaction
+ * @param createIfNotExists if true creates a new transaction if none exists
+ * @return a GlobalTransaction
+ */
+ GlobalTransaction getCurrentTransaction(Transaction tx, boolean createIfNotExists);
+
+ /**
+ * Returns the transaction associated with the current thread.
+ * If a local transaction exists, but doesn't yet have a mapping to a
+ * GlobalTransaction, a new GlobalTransaction will be created and mapped to
+ * the local transaction. Note that if a local transaction exists, but is
+ * not ACTIVE or PREPARING, null is returned.
+ *
+ * @return A GlobalTransaction, or null if no (local) transaction was associated with the current thread
+ */
+ GlobalTransaction getCurrentTransaction();
+
+ /**
+ * Returns the component registry associated with this cache instance.
+ *
+ * @see org.horizon.factories.ComponentRegistry
+ */
+ ComponentRegistry getComponentRegistry();
+
+ Object getDirect(Object key);
+
+ LockManager getLockManager();
+
+ BatchContainer getBatchContainer();
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/CacheSPI.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: core/branches/flat/src/main/java/org/horizon/EvictionManager.java (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/EvictionManager.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/EvictionManager.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/EvictionManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,40 @@
+package org.horizon;
+
+import net.jcip.annotations.ThreadSafe;
+import org.horizon.eviction.EvictionCacheManager;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+
+/**
+ * @author Mircea.Markus at jboss.com
+ */
+ at ThreadSafe
+ at NonVolatile
+ at Scope(Scopes.NAMED_CACHE)
+public interface EvictionManager
+{
+ /**
+ * Whenever a new cache is created this method should be called.
+ * If this cache does not have eviction enabled then this is a no-op.
+ * If the cache has eviction enabled then it is reistered for receivinge eviction information.
+ * If this is the first cache that requires eviction, the eviction theread will be started.
+ *
+ * @param cacheName
+ * @param cacheManager newly create cache.
+ */
+ public void cacheCreated(String cacheName, EvictionCacheManager cacheManager);
+
+
+ /**
+ * Whenever a cache will be stoped this method should be called.
+ * If the given cache doesn't have eviction enabled this is an no-op.
+ * If this is the only cache that has eviction enabled, then the eviction thread will be stopped.
+ * After calling this method the given cache will be unregistered from eviction events.
+ *
+ * @param cacheName
+ */
+ public void cacheStopped(String cacheName);
+
+ public void runEviction();
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/EvictionManager.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: core/branches/flat/src/main/java/org/horizon/annotations (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/jmx/annotations)
Modified: core/branches/flat/src/main/java/org/horizon/annotations/MBean.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/jmx/annotations/MBean.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/annotations/MBean.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.jmx.annotations;
+package org.horizon.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -30,7 +30,7 @@
/**
* Classes anotaded with this will be exposed as MBeans.
* If you are looking for more fined grained way of exposing jmx attributes/operations, take a look at
- * {@link org.jboss.cache.jmx.annotations.ManagedAttribute} and {@link org.jboss.cache.jmx.annotations.ManagedOperation}
+ * {@link org.horizon.jmx.annotations.ManagedAttribute} and {@link org.horizon.jmx.annotations.ManagedOperation}
*
* @author Mircea.Markus at jboss.com
* @since 3.0
Modified: core/branches/flat/src/main/java/org/horizon/annotations/ManagedAttribute.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/jmx/annotations/ManagedAttribute.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/annotations/ManagedAttribute.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.jmx.annotations;
+package org.horizon.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/annotations/ManagedOperation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/jmx/annotations/ManagedOperation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/annotations/ManagedOperation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.jmx.annotations;
+package org.horizon.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Copied: core/branches/flat/src/main/java/org/horizon/atomic (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/atomic)
Copied: core/branches/flat/src/main/java/org/horizon/atomic/APITest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/atomic/APITest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/atomic/APITest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/atomic/APITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,254 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon.atomic;
+
+import org.horizon.config.Configuration;
+import org.horizon.config.Configuration.CacheMode;
+import org.horizon.manager.CacheManager;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
+import org.testng.annotations.Test;
+
+import javax.transaction.Transaction;
+import java.util.Map;
+
+ at Test(groups = "functional")
+public class APITest
+{
+
+ private void assertIsEmpty(Map map)
+ {
+ assert map.size() == 0;
+ assert map.get("blah") == null;
+ assert !map.containsKey("blah");
+ }
+
+ private void assertIsEmptyMap(AtomicMapCache cache, Object key)
+ {
+ assertIsEmpty(cache.getAtomicMap(key));
+ }
+
+ public void testAtomicMap()
+ {
+ Configuration c = new Configuration();
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ try
+ {
+ AtomicMap map = cache.getAtomicMap("map");
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+
+ map.put("blah", "blah");
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+
+ map.clear();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+ }
+ finally
+ {
+ cache.stop();
+ }
+ }
+
+
+ public void testReadSafetyEmptyCache() throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ try
+ {
+ AtomicMap map = cache.getAtomicMap("map");
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+
+ DummyTransactionManager.getInstance().begin();
+ map.put("blah", "blah");
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+ Transaction t = DummyTransactionManager.getInstance().suspend();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+
+ DummyTransactionManager.getInstance().resume(t);
+ DummyTransactionManager.getInstance().commit();
+
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+
+ map.clear();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+ }
+ finally
+ {
+ cache.stop();
+ }
+ }
+
+ public void testReadSafetyNotEmptyCache() throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ try
+ {
+ AtomicMap map = cache.getAtomicMap("map");
+
+ DummyTransactionManager.getInstance().begin();
+ map.put("blah", "blah");
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+ Transaction t = DummyTransactionManager.getInstance().suspend();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+
+ DummyTransactionManager.getInstance().resume(t);
+ DummyTransactionManager.getInstance().commit();
+
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+
+ map.clear();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+ }
+ finally
+ {
+ cache.stop();
+ }
+ }
+
+ public void testReadSafetyRollback() throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache = (AtomicMapCache) new CacheManager(c).getCache();
+ try
+ {
+ AtomicMap map = cache.getAtomicMap("map");
+
+ DummyTransactionManager.getInstance().begin();
+ map.put("blah", "blah");
+ assert map.size() == 1;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+ Transaction t = DummyTransactionManager.getInstance().suspend();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+
+ DummyTransactionManager.getInstance().resume(t);
+ DummyTransactionManager.getInstance().rollback();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache, "map");
+ }
+ finally
+ {
+ cache.stop();
+ }
+ }
+
+ public void testReplicationCommit() throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ c.setCacheMode(CacheMode.REPL_SYNC);
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache1 = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache2 = (AtomicMapCache) new CacheManager(c).getCache();
+
+ try
+ {
+ TestingUtil.blockUntilViewsReceived(20000, cache1, cache2);
+ AtomicMap map = cache1.getAtomicMap("map");
+
+ DummyTransactionManager.getInstance().begin();
+ map.put("existing", "existing");
+ map.put("blah", "blah");
+ DummyTransactionManager.getInstance().commit();
+
+ assert map.size() == 2;
+ assert map.get("blah").equals("blah");
+ assert map.containsKey("blah");
+
+ System.out.println("Map on cache 2 is " + cache2.getAtomicMap("map"));
+
+ assert cache2.getAtomicMap("map").size() == 2;
+ assert cache2.getAtomicMap("map").get("blah").equals("blah");
+ assert cache2.getAtomicMap("map").containsKey("blah");
+ }
+ finally
+ {
+ TestingUtil.killCaches(cache1, cache2);
+ }
+ }
+
+ public void testReplicationRollback() throws Exception
+ {
+ Configuration c = new Configuration();
+ c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ c.setCacheMode(CacheMode.REPL_SYNC);
+ c.setInvocationBatchingEnabled(true);
+ AtomicMapCache cache1 = (AtomicMapCache) new CacheManager(c).getCache();
+ AtomicMapCache cache2 = (AtomicMapCache) new CacheManager(c).getCache();
+
+ try
+ {
+ TestingUtil.blockUntilViewsReceived(20000, cache1, cache2);
+ AtomicMap map = cache1.getAtomicMap("map");
+
+ DummyTransactionManager.getInstance().begin();
+ map.put("existing", "existing");
+ map.put("blah", "blah");
+ DummyTransactionManager.getInstance().rollback();
+
+ assertIsEmpty(map);
+ assertIsEmptyMap(cache1, "map");
+ assertIsEmptyMap(cache2, "map");
+ }
+ finally
+ {
+ TestingUtil.killCaches(cache1, cache2);
+ }
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/atomic/APITest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMap.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/AtomicHashMap.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMap.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import net.jcip.annotations.NotThreadSafe;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.util.FastCopyHashMap;
+import org.horizon.Cache;
+import org.horizon.util.FastCopyHashMap;
import java.util.Collection;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapDelta.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/AtomicHashMapDelta.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapDelta.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapProxy.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/AtomicHashMapProxy.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapProxy.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.batch.AutoBatchSupport;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
+import org.horizon.batch.AutoBatchSupport;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
/**
- * A layer of indirection around an {@link org.jboss.starobrno.atomic.AtomicHashMap} to provide reader consistency
+ * A layer of indirection around an {@link org.horizon.atomic.AtomicHashMap} to provide reader consistency
*
* @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik AT jboss DOT org</a>)
*/
Copied: core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/atomic/AtomicHashMapTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ */
+
+package org.horizon.atomic;
+
+import org.easymock.EasyMock;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.io.ObjectOutput;
+
+ at Test(groups = "unit")
+public class AtomicHashMapTest
+{
+ public void testDeltasWithEmptyMap() throws IOException
+ {
+ AtomicHashMap m = new AtomicHashMap();
+ Delta d = m.delta();
+ assert d instanceof NullDelta;
+ ObjectOutput out = EasyMock.createMock(ObjectOutput.class);
+ EasyMock.replay(out);
+ d.writeExternal(out);
+ EasyMock.verify(out);
+
+ AtomicHashMap newMap = new AtomicHashMap();
+ newMap.initForWriting();
+ newMap.put("k", "v");
+ newMap = (AtomicHashMap) d.merge(newMap);
+ assert newMap.containsKey("k");
+ assert newMap.size() == 1;
+
+ newMap = (AtomicHashMap) d.merge(null);
+ assert newMap.isEmpty();
+ }
+
+ public void testDeltasWithNoChanges() throws IOException
+ {
+ AtomicHashMap m = new AtomicHashMap();
+ m.initForWriting();
+ m.put("k1", "v1");
+ m.commit();
+ assert m.size() == 1;
+ Delta d = m.delta();
+ assert d instanceof NullDelta;
+ ObjectOutput out = EasyMock.createMock(ObjectOutput.class);
+ EasyMock.replay(out);
+ d.writeExternal(out);
+ EasyMock.verify(out);
+
+ AtomicHashMap newMap = new AtomicHashMap();
+ newMap.initForWriting();
+ newMap.put("k", "v");
+ newMap = (AtomicHashMap) d.merge(newMap);
+ assert newMap.containsKey("k");
+ assert newMap.size() == 1;
+
+ newMap = (AtomicHashMap) d.merge(null);
+ assert newMap.isEmpty();
+ }
+
+ public void testDeltasWithRepeatedChanges()
+ {
+ AtomicHashMap m = new AtomicHashMap();
+ m.initForWriting();
+ m.put("k1", "v1");
+ m.put("k1", "v2");
+ m.put("k1", "v3");
+ assert m.size() == 1;
+ AtomicHashMapDelta d = (AtomicHashMapDelta) m.delta();
+ assert d.getChangeLogSize() != 0;
+
+ AtomicHashMap newMap = new AtomicHashMap();
+ newMap.initForWriting();
+ newMap.put("k1", "v4");
+ newMap = (AtomicHashMap) d.merge(newMap);
+ assert newMap.containsKey("k1");
+ assert newMap.get("k1").equals("v3");
+ assert newMap.size() == 1;
+
+ newMap = (AtomicHashMap) d.merge(null);
+ assert newMap.containsKey("k1");
+ assert newMap.get("k1").equals("v3");
+ assert newMap.size() == 1;
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/atomic/AtomicHashMapTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/atomic/AtomicMap.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/AtomicMap.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicMap.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/AtomicMapCache.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/AtomicMapCache.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/AtomicMapCache.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
/**
* This interface adds the getAtomicMap() method which allows users to get a hold of a map type where operations on its
Modified: core/branches/flat/src/main/java/org/horizon/atomic/ClearOperation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/ClearOperation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/ClearOperation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
-import org.jboss.starobrno.util.FastCopyHashMap;
+import org.horizon.util.FastCopyHashMap;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/Delta.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/Delta.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/Delta.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.io.Externalizable;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/DeltaAware.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/DeltaAware.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/DeltaAware.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
/**
* This interface allows the extraction of deltas.
* <p/>
- * Implementations would be closely coupled to a corresponding {@link Delta} implementation, since {@link org.jboss.starobrno.atomic.Delta#instantiate()}
+ * Implementations would be closely coupled to a corresponding {@link Delta} implementation, since {@link org.horizon.atomic.Delta#instantiate()}
* would need to know how to recreate this instance of DeltaAware if needed.
* <p/>
*
Modified: core/branches/flat/src/main/java/org/horizon/atomic/NullDelta.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/NullDelta.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/NullDelta.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.io.Externalizable;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/Operation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/Operation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/Operation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.io.Externalizable;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/PutOperation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/PutOperation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/PutOperation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.io.IOException;
import java.io.ObjectInput;
Modified: core/branches/flat/src/main/java/org/horizon/atomic/RemoveOperation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/atomic/RemoveOperation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/atomic/RemoveOperation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.atomic;
+package org.horizon.atomic;
import java.io.IOException;
import java.io.ObjectInput;
Copied: core/branches/flat/src/main/java/org/horizon/batch (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/batch)
Modified: core/branches/flat/src/main/java/org/horizon/batch/AutoBatchSupport.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/batch/AutoBatchSupport.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/batch/AutoBatchSupport.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.batch;
+package org.horizon.batch;
import net.jcip.annotations.NotThreadSafe;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
/**
* Enables for automatic batching.
Modified: core/branches/flat/src/main/java/org/horizon/batch/BatchContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/batch/BatchContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/batch/BatchContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,17 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.batch;
+package org.horizon.batch;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.factories.annotations.Inject;
+import org.horizon.CacheException;
+import org.horizon.factories.annotations.Inject;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
/**
- * A container for holding thread locals for batching, to be used with the {@link org.jboss.cache.Cache_Legacy#startBatch()} and
- * {@link org.jboss.cache.Cache_Legacy#endBatch(boolean)} calls.
+ * A container for holding thread locals for batching, to be used with the {@link org.horizon.Cache#startBatch()} and
+ * {@link org.horizon.Cache#endBatch(boolean)} calls.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 3.0
Copied: core/branches/flat/src/main/java/org/horizon/cluster (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/cluster)
Modified: core/branches/flat/src/main/java/org/horizon/cluster/ReplicationQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/cluster/ReplicationQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/cluster/ReplicationQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.cluster;
+package org.horizon.cluster;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.remote.ReplicateCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
-import org.jboss.starobrno.remoting.RPCManager;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.remote.ReplicateCommand;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
+import org.horizon.remoting.RPCManager;
import java.util.ArrayList;
import java.util.LinkedList;
Copied: core/branches/flat/src/main/java/org/horizon/commands (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/commands)
Modified: core/branches/flat/src/main/java/org/horizon/commands/AbstractVisitor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/AbstractVisitor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/AbstractVisitor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.GravitateDataCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.InvalidateCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.context.InvocationContext;
import java.util.Collection;
@@ -85,11 +90,6 @@
return handleDefault(ctx, command);
}
- public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
- {
- return handleDefault(ctx, command);
- }
-
// tx commands
public Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
Modified: core/branches/flat/src/main/java/org/horizon/commands/CommandsFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/CommandsFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/CommandsFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,24 +19,24 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.remote.ReplicateCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.EvictCommand;
-import org.jboss.starobrno.commands.write.InvalidateCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.commands.write.ReplaceCommand;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.remote.ReplicateCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.InvalidateCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+import org.horizon.transaction.GlobalTransaction;
import org.jgroups.Address;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/commands/CommandsFactoryImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/CommandsFactoryImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/CommandsFactoryImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,21 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.remote.ReplicateCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.interceptors.InterceptorChain;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.CacheException;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.remote.ReplicateCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.*;
+import org.horizon.container.DataContainer;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.notifications.Notifier;
+import org.horizon.transaction.GlobalTransaction;
import org.jgroups.Address;
import java.util.List;
@@ -186,7 +186,7 @@
break;
}
case ReplicateCommand.MULTIPLE_METHOD_ID:
- case org.jboss.cache.commands.remote.ReplicateCommand.SINGLE_METHOD_ID:
+ case ReplicateCommand.SINGLE_METHOD_ID:
{
ReplicateCommand c = new ReplicateCommand();
c.initialize(interceptorChain);
Modified: core/branches/flat/src/main/java/org/horizon/commands/DataCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/DataCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/DataCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
/**
Modified: core/branches/flat/src/main/java/org/horizon/commands/ReplicableCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/ReplicableCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/ReplicableCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.context.InvocationContext;
/**
* The core of the command-based cache framework. Commands correspond to specific areas of functionality in the cache,
- * and can be replicated using the {@link org.jboss.cache.marshall.Marshaller} framework.
+ * and can be replicated using the {@link org.horizon.marshall.Marshaller} framework.
*
* @author Mircea.Markus at jboss.com
* @author Manik Surtani
@@ -60,9 +60,10 @@
Object[] getParameters();
/**
- * Used by the {@link org.jboss.cache.commands.CommandsFactory} to create a command from raw data read off a stream.
+ * Used by the {@link CommandsFactory} to create a command from raw data read off a stream.
*
- * @param commandId command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as {@link org.jboss.cache.commands.write.PutKeyValueCommand}.
+ * @param commandId command id to set. This is usually unused but *could* be used in the event of a command having
+ * multiple IDs, such as {@link org.horizon.commands.write.PutKeyValueCommand}.
* @param parameters object array of args
*/
void setParameters(int commandId, Object[] parameters);
Modified: core/branches/flat/src/main/java/org/horizon/commands/TransactionBoundaryCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/TransactionBoundaryCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/TransactionBoundaryCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.transaction.GlobalTransaction;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/commands/VisitableCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/VisitableCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/VisitableCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.context.InvocationContext;
/**
- * A type of command that can accept {@link org.jboss.cache.commands.Visitor}s, such as {@link org.jboss.cache.interceptors.base.CommandInterceptor}s.
+ * A type of command that can accept {@link Visitor}s, such as {@link org.horizon.interceptors.base.CommandInterceptor}s.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 2.2.0
Modified: core/branches/flat/src/main/java/org/horizon/commands/Visitor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/Visitor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/Visitor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands;
+package org.horizon.commands;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.GravitateDataCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.InvalidateCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.context.InvocationContext;
public interface Visitor
{
@@ -52,8 +57,6 @@
Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable;
- Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable;
-
// tx commands
Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable;
Modified: core/branches/flat/src/main/java/org/horizon/commands/read/AbstractDataCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/read/AbstractDataCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/read/AbstractDataCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.read;
+package org.horizon.commands.read;
-import org.jboss.starobrno.commands.DataCommand;
+import org.horizon.commands.DataCommand;
/**
* @author Mircea.Markus at jboss.com
Modified: core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/read/GetKeyValueCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/read/GetKeyValueCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.read;
+package org.horizon.commands.read;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.commands.Visitor;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
/**
* // TODO: MANIK: Document this
Deleted: core/branches/flat/src/main/java/org/horizon/commands/read/GravitateDataCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/read/GravitateDataCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/read/GravitateDataCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,258 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.commands.read;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jgroups.Address;
-
-/**
- * Used with buddy replication's {@link org.jboss.cache.interceptors.DataGravitatorInterceptor}.
- * <p/>
- * This is the equivalent of the old MethodCallDefinitions.dataGravitationMethod method call from 2.1.x.
- * <p/>
- *
- * @author Manik Surtani
- * @since 2.2.0
- */
-public class GravitateDataCommand extends AbstractDataCommand
-{
- public static final byte METHOD_ID = 35;
-
- /* dependencies */
- private CacheSPI spi;
-
- /* parametres */
- protected boolean searchSubtrees;
- private Address localAddress;
-
- private static final Log log = LogFactory.getLog(GravitateDataCommand.class);
- private static final boolean trace = log.isTraceEnabled();
- private BuddyFqnTransformer buddyFqnTransformer;
- private DataContainer dataContainer;
-
- public GravitateDataCommand(Object key, boolean searchSubtrees, Address localAddress)
- {
- this.key = key;
- this.searchSubtrees = searchSubtrees;
- this.localAddress = localAddress;
- }
-
- public GravitateDataCommand(Address localAddress)
- {
- this.localAddress = localAddress;
- }
-
- public void initialize(DataContainer dataContainer, CacheSPI spi, BuddyFqnTransformer transformer)
- {
- this.dataContainer = dataContainer;
- this.spi = spi;
- buddyFqnTransformer = transformer;
- }
-
- /**
- * Searches for data to gravitate given an Fqn and whether buddy backup subtrees are to be searched as well. Note that
- * data stored under the Fqn, along with all children, are retrieved.
- *
- * @param ctx invocation context
- * @return a {@link org.jboss.cache.buddyreplication.GravitateResult} containing node data, as well as information on whether this was found in a primary or backup tree.
- */
- @SuppressWarnings("unchecked")
- public Object perform(InvocationContext ctx)
- {
- /*
- // TODO: Test this with MVCC.
-
- // for now, perform a very simple series of getData calls.
- if (trace) log.trace("Caller is asking for " + key);
- try
- {
- ctx.setOriginLocal(false);
- // use a get() call into the cache to make sure cache loading takes place.
- // no need to cache the original skipDataGravitation setting here - it will always be false of we got here!!
- //todo 2.2 use dataContainer for peek and load the data in the CLInterceptor rather than using the SPI for than!!!
- ctx.getOptionOverrides().setSkipDataGravitation(true);
- Node actualNode = spi.getNode(fqn);
- ctx.getOptionOverrides().setSkipDataGravitation(false);
-
- if (trace) log.trace("In local tree, this is " + actualNode);
-
- Fqn backupNodeFqn = null;
- if (actualNode == null && searchSubtrees)
- {
- log.trace("Looking at backup trees.");
-
- // need to loop through backupSubtree's children
- Set allGroupNames = getBackupRoots();
- if (allGroupNames != null)
- {
- for (Object groupName : allGroupNames)
- {
- // groupName is the name of a buddy group since all child names in this
- // collection are direct children of BUDDY_BACKUP_SUBTREE_FQN
- Fqn backupRoot = Fqn.fromRelativeElements(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, (String) groupName);
- if (buddyFqnTransformer.isDeadBackupRoot(backupRoot))
- {
- Set<Integer> deadChildNames = new TreeSet<Integer>(spi.getChildrenNames(backupRoot));
- Integer[] elems = deadChildNames.toArray(new Integer[deadChildNames.size()]);
-
- // these are integers. we need to start with the highest/most recent.
- for (int i = elems.length - 1; i > -1; i--)
- {
- Integer versionOfDefunctData = elems[i];
- backupNodeFqn = Fqn.fromRelativeFqn(Fqn.fromRelativeElements(backupRoot, versionOfDefunctData), fqn);
-
- // use a get() call into the cache to make sure cache loading takes place.
- ctx.getOptionOverrides().setSkipDataGravitation(true);
- actualNode = spi.peek(backupNodeFqn, false);
- ctx.getOptionOverrides().setSkipDataGravitation(false);
-
- // break out of the inner loop searching through the dead node's various backups
- if (actualNode != null) break;
- }
- }
- else
- {
- backupNodeFqn = Fqn.fromRelativeFqn(backupRoot, fqn);
- // use a get() call into the cache to make sure cache loading takes place.
- ctx.getOptionOverrides().setSkipDataGravitation(true);
- actualNode = spi.getNode(backupNodeFqn);
- ctx.getOptionOverrides().setSkipDataGravitation(false);
- }
-
- if (trace)
- log.trace("Looking for " + backupNodeFqn + ". Search result: " + actualNode);
-
- // break out of outer loop searching through all available backups.
- if (actualNode != null) break;
- }
- }
-
- }
-
- if (actualNode == null)
- {
- return GravitateResult.noDataFound();
- }
- else
- {
- // make sure we LOAD data for this node!!
- actualNode.getData();
- }
-
- if (backupNodeFqn == null && searchSubtrees)
- {
- backupNodeFqn = buddyFqnTransformer.getBackupFqn(buddyFqnTransformer.getGroupNameFromAddress(localAddress), fqn);
- }
-
- List<NodeData> list = dataContainer.buildNodeData(new LinkedList<NodeData>(), (NodeSPI) actualNode, false);
-
- return GravitateResult.subtreeResult(list, backupNodeFqn);
- }
- catch (RuntimeException re)
- {
- if (trace) log.trace("Caught throwable", re);
- throw re;
- }
- finally
- {
- ctx.setOriginLocal(true);
- }
- */
-
- throw new UnsupportedOperationException("FIX ME");
- // TODO: implement BR on flat cache
- }
-
- /**
- * @return a Set of child node names that hang directly off the backup tree root, or null if the backup tree root doesn't exist.
- */
-// protected Set<Object> getBackupRoots()
-// {
-// InternalNode backupSubtree = dataContainer.peekInternalNode(BuddyManager.BUDDY_BACKUP_SUBTREE_FQN, false);
-// if (backupSubtree == null) return null;
-// return backupSubtree.getChildrenNames();
-// }
- public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
- {
- return visitor.visitGravitateDataCommand(ctx, this);
- }
-
- public byte getCommandId()
- {
- return METHOD_ID;
- }
-
- public boolean isSearchSubtrees()
- {
- return searchSubtrees;
- }
-
- @Override
- public Object[] getParameters()
- {
- return new Object[]{key, searchSubtrees};
- }
-
- @Override
- public void setParameters(int commandId, Object[] args)
- {
- key = args[0];
- searchSubtrees = (Boolean) args[1];
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- GravitateDataCommand that = (GravitateDataCommand) o;
-
- if (searchSubtrees != that.searchSubtrees) return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result = super.hashCode();
- result = 31 * result + (searchSubtrees ? 1 : 0);
- return result;
- }
-
- @Override
- public String toString()
- {
- return "GravitateDataCommand{" +
- "key=" + key +
- ", searchSubtrees=" + searchSubtrees +
- '}';
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/commands/read/SizeCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/read/SizeCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/read/SizeCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.read;
+package org.horizon.commands.read;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.Visitor;
+import org.horizon.container.DataContainer;
+import org.horizon.context.InvocationContext;
/**
* // TODO: MANIK: Document this
Deleted: core/branches/flat/src/main/java/org/horizon/commands/remote/AnnounceBuddyPoolNameCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/AnnounceBuddyPoolNameCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/AnnounceBuddyPoolNameCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.commands.remote;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jgroups.Address;
-
-/**
- * Announces a buddy pool name to the cluster. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
- * <p/>
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2.0
- */
-public class AnnounceBuddyPoolNameCommand implements ReplicableCommand
-{
- public static final byte METHOD_ID = 28;
- private static final Log log = LogFactory.getLog(AnnounceBuddyPoolNameCommand.class);
-
- /* dependencies*/
- private BuddyManager buddyManager;
-
- /*parameters */
- private Address address;
- private String buddyPoolName;
-
- public AnnounceBuddyPoolNameCommand()
- {
- }
-
- public AnnounceBuddyPoolNameCommand(Address address, String buddyPoolName)
- {
- this.address = address;
- this.buddyPoolName = buddyPoolName;
- }
-
- public void initialize(BuddyManager buddyManager)
- {
- this.buddyManager = buddyManager;
- }
-
- /**
- * This method calls the relevant handler on the buddy manager to deal with this pool broadcast.
- *
- * @param ctx invocation context, ignored.
- * @return null
- * @throws Throwable in the event of problems
- */
- public Object perform(InvocationContext ctx) throws Throwable
- {
- if (buddyManager != null)
- buddyManager.handlePoolNameBroadcast(address, buddyPoolName);
- else if (log.isWarnEnabled())
- log.warn("Received annouceBuddyPoolName call from [" + address + "] but buddy replication is not enabled on this node!");
- return null;
- }
-
- public byte getCommandId()
- {
- return METHOD_ID;
- }
-
- public Address getAddress()
- {
- return address;
- }
-
- public String getBuddyPoolName()
- {
- return buddyPoolName;
- }
-
- public Object[] getParameters()
- {
- return new Object[]{address, buddyPoolName};
- }
-
- public void setParameters(int commandId, Object[] args)
- {
- address = (Address) args[0];
- buddyPoolName = (String) args[1];
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- AnnounceBuddyPoolNameCommand that = (AnnounceBuddyPoolNameCommand) o;
-
- if (address != null ? !address.equals(that.address) : that.address != null) return false;
- if (buddyPoolName != null ? !buddyPoolName.equals(that.buddyPoolName) : that.buddyPoolName != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result;
- result = (address != null ? address.hashCode() : 0);
- result = 31 * result + (buddyPoolName != null ? buddyPoolName.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString()
- {
- return "AnnounceBuddyPoolNameCommand{" +
- "buddyManager=" + buddyManager +
- ", address=" + address +
- ", buddyPoolName='" + buddyPoolName + '\'' +
- '}';
- }
-}
Deleted: core/branches/flat/src/main/java/org/horizon/commands/remote/AssignToBuddyGroupCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/AssignToBuddyGroupCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/AssignToBuddyGroupCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.commands.remote;
-
-import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.tree.Fqn;
-
-import java.util.Arrays;
-import java.util.Map;
-
-/**
- * Assigns a buddy to a group. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
- * <p/>
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2.0
- */
-public class AssignToBuddyGroupCommand implements ReplicableCommand
-{
- public static final byte METHOD_ID = 29;
-
- /* dependencies */
- private BuddyManager buddyManager;
-
- /* parameters */
- private BuddyGroup group;
- private Map<Fqn, byte[]> state;
-
- public AssignToBuddyGroupCommand(BuddyGroup group, Map<Fqn, byte[]> state)
- {
- this.group = group;
- this.state = state;
- }
-
- public AssignToBuddyGroupCommand()
- {
- }
-
- public void initialize(BuddyManager manager)
- {
- this.buddyManager = manager;
- }
-
- /**
- * This method calls the relevant handler on the buddy manager to deal with being assigned to a buddy group
- *
- * @param ctx invocation context, ignored.
- * @return null
- * @throws Throwable in the event of problems
- */
- public Object perform(InvocationContext ctx) throws Throwable
- {
- if (buddyManager != null)
- buddyManager.handleAssignToBuddyGroup(group, state);
- return null;
- }
-
- public byte getCommandId()
- {
- return METHOD_ID;
- }
-
- public BuddyGroup getGroup()
- {
- return group;
- }
-
- public Map<Fqn, byte[]> getState()
- {
- return state;
- }
-
- public Object[] getParameters()
- {
- return new Object[]{group, state};
- }
-
- @SuppressWarnings("unchecked")
- public void setParameters(int commandId, Object[] args)
- {
- group = (BuddyGroup) args[0];
- state = (Map<Fqn, byte[]>) args[1];
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- AssignToBuddyGroupCommand that = (AssignToBuddyGroupCommand) o;
-
- if (group != null ? !group.equals(that.group) : that.group != null) return false;
- if (state != null ? !state.equals(that.state) : that.state != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result;
- result = (group != null ? group.hashCode() : 0);
- result = 31 * result + (state != null ? state.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString()
- {
- return "AssignToBuddyGroupCommand{" +
- "buddyManager=" + buddyManager +
- ", group=" + group +
- ", state=" + (state == null ? null : Arrays.asList(state)) +
- '}';
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/ClusteredGetCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/ClusteredGetCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,23 +19,23 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.remote;
+package org.horizon.commands.remote;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.commands.DataCommand;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.InterceptorChain;
+import org.horizon.commands.DataCommand;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.container.DataContainer;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.InterceptorChain;
import java.util.ArrayList;
import java.util.List;
/**
- * Issues a clustered get call, for use primarily by the {@link org.jboss.cache.loader.ClusteredCacheLoader}. This is
- * not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * Issues a clustered get call, for use primarily by the {@link ClusteredCacheLoader}. This is
+ * not a {@link org.horizon.commands.VisitableCommand} and hence
+ * not passed up the {@link org.horizon.interceptors.base.CommandInterceptor} chain.
* <p/>
*
* @author Mircea.Markus at jboss.com
@@ -70,7 +70,7 @@
}
/**
- * Invokes a {@link org.jboss.cache.commands.DataCommand} on a remote cache and returns results.
+ * Invokes a {@link DataCommand} on a remote cache and returns results.
*
* @param context invocation context, ignored.
* @return a List containing 2 elements: a boolean, (true or false) and a value (Object) which is the result of invoking a remote get specified by {@link #getDataCommand()}. If buddy replication is used one further element is added - an Fqn of the backup subtree in which this node may be found.
Deleted: core/branches/flat/src/main/java/org/horizon/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/DataGravitationCleanupCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/DataGravitationCleanupCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,245 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.commands.remote;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.commands.CommandsFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.InterceptorChain;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jboss.starobrno.tree.Fqn;
-
-/**
- * Data gravitation cleanup handler. Primarily used by the {@link org.jboss.cache.interceptors.DataGravitatorInterceptor}.
- * This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
- * <p/>
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2
- */
-public class DataGravitationCleanupCommand implements ReplicableCommand
-{
- public static final byte METHOD_ID = 34;
- private static final Log log = LogFactory.getLog(DataGravitationCleanupCommand.class);
- private static final boolean trace = log.isTraceEnabled();
-
- /* dependencies */
- private BuddyManager buddyManager;
- private TransactionTable transactionTable;
- private InterceptorChain invoker;
- private CommandsFactory commandsFactory;
- private DataContainer dataContainer;
-
- /* parameters */
- private GlobalTransaction globalTransaction;
- private Fqn fqn;
- private Fqn backup;
- private BuddyFqnTransformer buddyFqnTransformer;
-
-
- public DataGravitationCleanupCommand(Fqn primary, Fqn backup)
- {
- this.fqn = primary;
- this.backup = backup;
- }
-
- public DataGravitationCleanupCommand()
- {
- }
-
- public void initialize(BuddyManager buddyManager, InterceptorChain invoker, TransactionTable transactionTable,
- CommandsFactory commandsFactory, DataContainer dataContainer, BuddyFqnTransformer buddyFqnTransformer)
- {
- this.buddyManager = buddyManager;
- this.invoker = invoker;
- this.transactionTable = transactionTable;
- this.commandsFactory = commandsFactory;
- this.dataContainer = dataContainer;
- this.buddyFqnTransformer = buddyFqnTransformer;
- }
-
- /**
- * Performs a cleanup on nodes that would have been previously gravitated away from the current cache instance.
- */
- public Object perform(InvocationContext ctx) throws Throwable
- {/*
- if (buddyManager.isDataGravitationRemoveOnFind())
- {
- if (trace)
- log.trace("DataGravitationCleanup: Removing primary (" + fqn + ") and backup (" + backup + ")");
-
- GlobalTransaction gtx = transactionTable.getCurrentTransaction();
- if (!executeRemove(gtx, fqn))
- {
- // only attempt to clean up the backup if the primary did not exist - a waste of a call otherwise.
- Object result = executeRemove(gtx, backup);
- if (wasNodeRemoved(result))
- {
- // if this is a DIRECT child of a DEAD buddy backup region, then remove the empty dead region structural node.
- if (buddyFqnTransformer.isDeadBackupFqn(backup) && buddyFqnTransformer.isDeadBackupRoot(backup.getAncestor(backup.size() - 2)))
- {
- Fqn deadBackupRootFqn = backup.getParent();
- if (!dataContainer.hasChildren(deadBackupRootFqn))
- {
- if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
- executeRemove(gtx, deadBackupRootFqn);
-
- // now check the grand parent and see if we are free of versions
- deadBackupRootFqn = deadBackupRootFqn.getParent();
- if (!dataContainer.hasChildren(deadBackupRootFqn))
- {
- if (trace) log.trace("Removing dead backup region " + deadBackupRootFqn);
- executeRemove(gtx, deadBackupRootFqn);
- }
- }
- }
- }
- }
- else
- {
- if (trace) log.trace("Managed to remove primary (" + fqn + "). Not bothering with backups.");
- }
- }
- else
- {
- if (trace)
- log.trace("DataGravitationCleanup: Evicting primary (" + fqn + ") and backup (" + backup + ")");
- evictNode(fqn);
- evictNode(backup);
- }
- return null; */
- // TODO - needs implementation
- throw new UnsupportedOperationException("Fix me!");
- }
-
- /**
- * Returns true if such a node was removed.
- */
-// private boolean executeRemove(GlobalTransaction gtx, Fqn toRemove) throws Throwable
-// {
-// Object result;
-// RemoveNodeCommand removeBackupCommand = commandsFactory.buildRemoveNodeCommand(gtx, toRemove);
-//
-// InvocationContext ctx = invoker.getInvocationContext();
-// ctx.getOptionOverrides().setCacheModeLocal(true);
-// result = invoker.invoke(ctx, removeBackupCommand);
-// return result != null && (Boolean) result;
-// }
- private boolean wasNodeRemoved(Object result)
- {
- return result != null && (Boolean) result;
- }
-
-// private void evictNode(Fqn fqn) throws Throwable
-// {
-// if (dataContainer.exists(fqn))
-// {
-// List<Fqn> toEvict = dataContainer.getNodesForEviction(fqn, true);
-// for (Fqn aFqn : toEvict)
-// {
-// EvictCommand evictFqnCommand = commandsFactory.buildEvictFqnCommand(aFqn);
-// invoker.invoke(evictFqnCommand);
-// }
-// }
-// else
-// {
-// if (trace) log.trace("Not evicting " + fqn + " as it doesn't exist");
-// }
-// }
-
- public byte getCommandId()
- {
- return METHOD_ID;
- }
-
- public Fqn getBackup()
- {
- return backup;
- }
-
- public GlobalTransaction getGlobalTransaction()
- {
- return globalTransaction;
- }
-
- public void setGlobalTransaction(GlobalTransaction gtx)
- {
- this.globalTransaction = gtx;
- }
-
- public Fqn getFqn()
- {
- return fqn;
- }
-
- public Object[] getParameters()
- {
- return new Object[]{fqn, backup}; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void setParameters(int commandId, Object[] args)
- {
- fqn = (Fqn) args[0];
- backup = (Fqn) args[1];
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- DataGravitationCleanupCommand that = (DataGravitationCleanupCommand) o;
-
- if (backup != null ? !backup.equals(that.backup) : that.backup != null) return false;
- if (globalTransaction != null ? !globalTransaction.equals(that.globalTransaction) : that.globalTransaction != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- int result = super.hashCode();
- result = 31 * result + (globalTransaction != null ? globalTransaction.hashCode() : 0);
- result = 31 * result + (backup != null ? backup.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString()
- {
- return "DataGravitationCleanupCommand{" +
- "fqn=" + fqn +
- ", backup=" + backup +
- '}';
- }
-}
Deleted: core/branches/flat/src/main/java/org/horizon/commands/remote/RemoveFromBuddyGroupCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/RemoveFromBuddyGroupCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/RemoveFromBuddyGroupCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.commands.remote;
-
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-
-/**
- * Removes a buddy from a group. This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
- * <p/>
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2
- */
-public class RemoveFromBuddyGroupCommand implements ReplicableCommand
-{
- public static final byte METHOD_ID = 30;
-
- private BuddyManager buddyManager;
-
- private String groupName;
-
- public RemoveFromBuddyGroupCommand(String groupName)
- {
- this.groupName = groupName;
- }
-
- public RemoveFromBuddyGroupCommand()
- {
- }
-
- public void initialize(BuddyManager buddyManager)
- {
- this.buddyManager = buddyManager;
- }
-
- /**
- * This method calls the relevant handler on the buddy manager to deal with being removed from a buddy group
- *
- * @param ctx invocation context, ignored.
- * @return null
- */
- public Object perform(InvocationContext ctx)
- {
- if (buddyManager != null)
- buddyManager.handleRemoveFromBuddyGroup(groupName);
- return null;
- }
-
- public byte getCommandId()
- {
- return METHOD_ID;
- }
-
- public String getGroupName()
- {
- return groupName;
- }
-
- public Object[] getParameters()
- {
- return new Object[]{groupName};
- }
-
- public void setParameters(int commandId, Object[] args)
- {
- groupName = (String) args[0];
- }
-
- @Override
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- RemoveFromBuddyGroupCommand that = (RemoveFromBuddyGroupCommand) o;
-
- if (groupName != null ? !groupName.equals(that.groupName) : that.groupName != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode()
- {
- return (groupName != null ? groupName.hashCode() : 0);
- }
-
- @Override
- public String toString()
- {
- return "RemoveFromBuddyGroupCommand{" +
- "buddyManager=" + buddyManager +
- ", groupName='" + groupName + '\'' +
- '}';
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/commands/remote/ReplicateCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/remote/ReplicateCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/remote/ReplicateCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.remote;
+package org.horizon.commands.remote;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.InterceptorChain;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.InterceptorChain;
import java.util.ArrayList;
import java.util.List;
@@ -36,8 +35,8 @@
* Command that implements cluster replication logic. Essentially mimics the replicate() and replicateAll() methods
* in 2.1.x, we may need to revisit the usefulness of such a command.
* <p/>
- * This is not a {@link org.jboss.cache.commands.VisitableCommand} and hence
- * not passed up the {@link org.jboss.cache.interceptors.base.CommandInterceptor} chain.
+ * This is not a {@link VisitableCommand} and hence
+ * not passed up the {@link org.horizon.interceptors.base.CommandInterceptor} chain.
* <p/>
*
* @author Mircea.Markus at jboss.com
@@ -103,25 +102,20 @@
* Executes commands replicated to the current cache instance by other cache instances.
*
* @param ctx invocation context, ignored.
- * @return if this is a single command being processed <b>and</b> it is a {@link org.jboss.cache.commands.read.GravitateDataCommand}, the result of processing this command is returned. Otherwise, null is returned.
+ * @return null
* @throws Throwable
*/
public Object perform(InvocationContext ctx) throws Throwable
{
if (isSingleCommand())
{
- Object retVal = processSingleCommand(singleModification);
-
- // only send back the result of the execution if it is a data gravitation command.
- // all other commands don't need to send back return values, there will be an unnecessary overhead of
- // marshalling results that won't ever be used.
- if (singleModification instanceof GravitateDataCommand)
- return retVal;
- else
- return null;
+ return processSingleCommand(singleModification);
}
- for (ReplicableCommand command : modifications) processSingleCommand(command);
- return null;
+ else
+ {
+ for (ReplicableCommand command : modifications) processSingleCommand(command);
+ return null;
+ }
}
private Object processSingleCommand(ReplicableCommand cacheCommand)
@@ -169,7 +163,7 @@
private boolean returnValueForRemoteCall(ReplicableCommand cacheCommand)
{
- return cacheCommand instanceof GravitateDataCommand || cacheCommand instanceof ClusteredGetCommand;
+ return cacheCommand instanceof ClusteredGetCommand;
}
public byte getCommandId()
Modified: core/branches/flat/src/main/java/org/horizon/commands/tx/AbstractTransactionBoundaryCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/tx/AbstractTransactionBoundaryCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/tx/AbstractTransactionBoundaryCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.tx;
+package org.horizon.commands.tx;
-import org.jboss.starobrno.commands.TransactionBoundaryCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.TransactionBoundaryCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.transaction.GlobalTransaction;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/commands/tx/CommitCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/tx/CommitCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/tx/CommitCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.tx;
+package org.horizon.commands.tx;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.Visitor;
+import org.horizon.context.InvocationContext;
+import org.horizon.transaction.GlobalTransaction;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/commands/tx/PrepareCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/tx/PrepareCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/tx/PrepareCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.tx;
+package org.horizon.commands.tx;
-import org.jboss.starobrno.commands.DataCommand;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.DataCommand;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.Visitor;
+import org.horizon.context.InvocationContext;
+import org.horizon.transaction.GlobalTransaction;
import org.jgroups.Address;
import java.util.ArrayList;
Modified: core/branches/flat/src/main/java/org/horizon/commands/tx/RollbackCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/tx/RollbackCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/tx/RollbackCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.tx;
+package org.horizon.commands.tx;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.Visitor;
+import org.horizon.context.InvocationContext;
+import org.horizon.transaction.GlobalTransaction;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/ClearCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/ClearCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/ClearCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.Visitor;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
/**
* @author Mircea.Markus at jboss.com
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/EvictCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/EvictCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.commands.read.AbstractDataCommand;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.commands.Visitor;
+import org.horizon.commands.read.AbstractDataCommand;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
/**
* @author Mircea.Markus at jboss.com
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/InvalidateCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/InvalidateCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,17 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.NodeSPI;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.commands.read.AbstractDataCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.CacheSPI;
+import org.horizon.commands.Visitor;
+import org.horizon.commands.read.AbstractDataCommand;
+import org.horizon.container.DataContainer;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
+import org.horizon.tree.Fqn;
/**
@@ -114,9 +113,11 @@
* mark the node to be removed (and all children) as invalid so anyone holding a direct reference to it will
* be aware that it is no longer valid.
*/
- protected void invalidateNode(NodeSPI node)
+ protected void invalidateNode()//NodeSPI node)
{
- node.setValid(false, true);
+ // TODO: Implement me!
+ throw new RuntimeException("Implement me!");
+// node.setValid(false, true);
// root nodes can never be invalid
// if (fqn.isRoot()) node.setValid(true, false); // non-recursive.
}
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/PutKeyValueCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/PutKeyValueCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.atomic.Delta;
-import org.jboss.starobrno.atomic.DeltaAware;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.commands.read.AbstractDataCommand;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.atomic.Delta;
+import org.horizon.atomic.DeltaAware;
+import org.horizon.commands.Visitor;
+import org.horizon.commands.read.AbstractDataCommand;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
/**
- * Implements functionality defined by {@link Cache#put(org.jboss.cache.Fqn, Object, Object)}.
+ * Implements functionality defined by {@link org.horizon.Cache#put(Object, Object)}
*
* @author Mircea.Markus at jboss.com
* @since 2.2
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/PutMapCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/PutMapCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.Visitor;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
import java.util.Map;
import java.util.Map.Entry;
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/RemoveCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/RemoveCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.commands.read.AbstractDataCommand;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.commands.Visitor;
+import org.horizon.commands.read.AbstractDataCommand;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.notifications.Notifier;
/**
Modified: core/branches/flat/src/main/java/org/horizon/commands/write/ReplaceCommand.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/commands/write/ReplaceCommand.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/commands/write/ReplaceCommand.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.commands.write;
+package org.horizon.commands.write;
-import org.jboss.starobrno.commands.Visitor;
-import org.jboss.starobrno.commands.read.AbstractDataCommand;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.Visitor;
+import org.horizon.commands.read.AbstractDataCommand;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
/**
Copied: core/branches/flat/src/main/java/org/horizon/config (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/config)
Deleted: core/branches/flat/src/main/java/org/horizon/config/BuddyReplicationConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/BuddyReplicationConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/BuddyReplicationConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,208 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.config;
-
-import org.jboss.cache.buddyreplication.NextMemberBuddyLocator;
-import org.jboss.starobrno.util.Util;
-
-import java.util.Properties;
-
-
-public class BuddyReplicationConfig extends ConfigurationComponent
-{
- private static final long serialVersionUID = -4826380823985089339L;
-
- /**
- * Test whether buddy replication is enabled.
- */
- private boolean enabled;
-
- /**
- * Name of the buddy pool for current instance. May be null if buddy pooling is not used.
- */
- private String buddyPoolName;
-
- private boolean autoDataGravitation = true;
- private boolean dataGravitationRemoveOnFind = true;
- private boolean dataGravitationSearchBackupTrees = true;
- @Dynamic
- private int buddyCommunicationTimeout = 10000;
- private BuddyLocatorConfig buddyLocatorConfig;
-
- public boolean isAutoDataGravitation()
- {
- return autoDataGravitation;
- }
-
- public void setAutoDataGravitation(boolean autoDataGravitation)
- {
- testImmutability("autoDataGravitation");
- this.autoDataGravitation = autoDataGravitation;
- }
-
- public int getBuddyCommunicationTimeout()
- {
- return buddyCommunicationTimeout;
- }
-
- public void setBuddyCommunicationTimeout(int buddyCommunicationTimeout)
- {
- testImmutability("buddyCommunicationTimeout");
- this.buddyCommunicationTimeout = buddyCommunicationTimeout;
- }
-
- public String getBuddyPoolName()
- {
- return buddyPoolName;
- }
-
- public void setBuddyPoolName(String buddyPoolName)
- {
- testImmutability("buddyPoolName");
- this.buddyPoolName = buddyPoolName;
- }
-
- public boolean isDataGravitationRemoveOnFind()
- {
- return dataGravitationRemoveOnFind;
- }
-
- public void setDataGravitationRemoveOnFind(boolean dataGravitationRemoveOnFind)
- {
- testImmutability("dataGravitationRemoveOnFind");
- this.dataGravitationRemoveOnFind = dataGravitationRemoveOnFind;
- }
-
- public boolean isDataGravitationSearchBackupTrees()
- {
- return dataGravitationSearchBackupTrees;
- }
-
- public void setDataGravitationSearchBackupTrees(boolean dataGravitationSearchBackupTrees)
- {
- testImmutability("dataGravitationSearchBackupTrees");
- this.dataGravitationSearchBackupTrees = dataGravitationSearchBackupTrees;
- }
-
- public boolean isEnabled()
- {
- return enabled;
- }
-
- public void setEnabled(boolean enabled)
- {
- testImmutability("enabled");
- this.enabled = enabled;
- }
-
- public BuddyLocatorConfig getBuddyLocatorConfig()
- {
- return buddyLocatorConfig;
- }
-
- public void setBuddyLocatorConfig(BuddyLocatorConfig buddyLocatorConfig)
- {
- testImmutability("buddyLocatorConfig");
- replaceChildConfig(this.buddyLocatorConfig, buddyLocatorConfig);
- this.buddyLocatorConfig = buddyLocatorConfig;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (this == obj)
- return true;
-
- if (obj instanceof BuddyReplicationConfig)
- {
- BuddyReplicationConfig other = (BuddyReplicationConfig) obj;
- return (this.autoDataGravitation == other.autoDataGravitation)
- && (this.dataGravitationRemoveOnFind == other.dataGravitationRemoveOnFind)
- && (this.dataGravitationSearchBackupTrees == other.dataGravitationSearchBackupTrees)
- && (this.enabled == other.enabled)
- && (this.buddyCommunicationTimeout == other.buddyCommunicationTimeout)
- && Util.safeEquals(this.buddyPoolName, other.buddyPoolName)
- && Util.safeEquals(this.buddyLocatorConfig, other.buddyLocatorConfig);
- }
-
- return false;
- }
-
- @Override
- public int hashCode()
- {
- int result = 11;
- result = 29 * result + (autoDataGravitation ? 0 : 1);
- result = 29 * result + (dataGravitationRemoveOnFind ? 0 : 1);
- result = 29 * result + (dataGravitationSearchBackupTrees ? 0 : 1);
- result = 29 * result + (enabled ? 0 : 1);
- result = 29 * result + buddyCommunicationTimeout;
- result = 29 * result + (buddyPoolName == null ? 0 : buddyPoolName.hashCode());
- result = 29 * result + (buddyLocatorConfig == null ? 0 : buddyLocatorConfig.hashCode());
- return result;
- }
-
- @Override
- public BuddyReplicationConfig clone() throws CloneNotSupportedException
- {
- BuddyReplicationConfig clone = (BuddyReplicationConfig) super.clone();
- if (buddyLocatorConfig != null)
- clone.setBuddyLocatorConfig(buddyLocatorConfig.clone());
- return clone;
- }
-
- public static class BuddyLocatorConfig extends PluggableConfigurationComponent
- {
- private static final long serialVersionUID = -8003634097931826091L;
-
- public BuddyLocatorConfig()
- {
- // default
- className = NextMemberBuddyLocator.class.getName();
- }
-
- public String getBuddyLocatorClass()
- {
- return className;
- }
-
- public void setBuddyLocatorClass(String buddyLocatorClass)
- {
- setClassName(buddyLocatorClass);
- }
-
- public Properties getBuddyLocatorProperties()
- {
- return properties;
- }
-
- public void setBuddyLocatorProperties(Properties buddyLocatorProperties)
- {
- setProperties(buddyLocatorProperties);
- }
-
- public BuddyLocatorConfig clone() throws CloneNotSupportedException
- {
- return (BuddyLocatorConfig) super.clone();
- }
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/CacheLoaderConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/CacheLoaderConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
+import org.horizon.loader.CacheLoader;
+import org.horizon.util.Util;
+import org.horizon.loader.SingletonStoreCacheLoader;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import org.jboss.cache.loader.SingletonStoreCacheLoader;
-import org.jboss.starobrno.loader.CacheLoader;
-import org.jboss.starobrno.util.Util;
-
/**
* Holds the configuration of the cache loader chain. ALL cache loaders should be defined using this class, adding
* individual cache loaders to the chain by calling {@link CacheLoaderConfig#addIndividualCacheLoaderConfig}
Modified: core/branches/flat/src/main/java/org/horizon/config/CloneableConfigurationComponent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/CloneableConfigurationComponent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/CloneableConfigurationComponent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import java.io.Serializable;
Modified: core/branches/flat/src/main/java/org/horizon/config/Configuration.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/Configuration.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/Configuration.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.cache.Version;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.parsing.JGroupsStackParser;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.util.ReflectionUtil;
+import org.horizon.CacheException;
+import org.horizon.Version;
+import org.horizon.config.parsing.JGroupsStackParser;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.annotations.Start;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.marshall.Marshaller;
+import org.horizon.util.ReflectionUtil;
import org.w3c.dom.Element;
import java.net.URL;
@@ -49,7 +48,7 @@
{
private static final long serialVersionUID = 5553791890144997466L;
- private ExtendedMarshaller marshaller;
+ private Marshaller marshaller;
private transient JGroupsStackParser jGroupsStackParser = new JGroupsStackParser();
private boolean invocationBatchingEnabled;
@@ -192,7 +191,6 @@
private boolean syncCommitPhase = false;
@Dynamic
private boolean syncRollbackPhase = false;
- private BuddyReplicationConfig buddyReplicationConfig;
private String muxStackName = null;
private boolean usingMultiplexer = false;
@@ -232,13 +230,13 @@
// SETTERS - MAKE SURE ALL SETTERS PERFORM testImmutability()!!!
// ------------------------------------------------------------------------------------------------------------
- public void setCacheMarshaller(ExtendedMarshaller instance)
+ public void setCacheMarshaller(Marshaller instance)
{
testImmutability("marshaller");
marshaller = instance;
}
- public ExtendedMarshaller getMarshaller()
+ public Marshaller getMarshaller()
{
return marshaller;
}
@@ -304,8 +302,8 @@
}
/**
- * Enables invocation batching if set to <tt>true</tt>. You still need to use {@link org.jboss.cache.Cache_Legacy#startBatch()}
- * and {@link org.jboss.cache.Cache_Legacy#endBatch(boolean)} to demarcate the start and end of batches.
+ * Enables invocation batching if set to <tt>true</tt>. You still need to use {@link org.horizon.Cache#startBatch()}
+ * and {@link org.horizon.Cache#endBatch(boolean)} to demarcate the start and end of batches.
*
* @param enabled if true, batching is enabled.
* @since 3.0
@@ -431,7 +429,7 @@
/**
* Sets the size of the asynchronous listener notification thread pool size. Defaults to 1, and if set to below 1,
- * all async listeners (specified with {@link org.jboss.cache.notifications.annotation.CacheListener#sync()} are notified
+ * all async listeners (specified with {@link org.horizon.notifications.annotation.CacheListener#sync()} are notified
* synchronously.
*
* @param listenerAsyncPoolSize number of threads in pool
@@ -443,13 +441,6 @@
this.listenerAsyncPoolSize = listenerAsyncPoolSize;
}
- public void setBuddyReplicationConfig(BuddyReplicationConfig config)
- {
- testImmutability("buddyReplicationConfig");
- replaceChildConfig(this.buddyReplicationConfig, config);
- this.buddyReplicationConfig = config;
- }
-
public void setUseReplQueue(boolean useReplQueue)
{
testImmutability("useReplQueue");
@@ -673,7 +664,7 @@
public String getReplVersionString()
{
- return Version.getVersionString(replicationVersion);
+ return Version.decodeVersion(replicationVersion);
}
public long getLockAcquisitionTimeout()
@@ -739,7 +730,7 @@
/**
* Gets the size of the asynchronous listener notification thread pool size. Defaults to 1, and if set to below 1,
- * all async listeners (specified with {@link org.jboss.cache.notifications.annotation.CacheListener#sync()} are notified
+ * all async listeners (specified with {@link org.horizon.notifications.annotation.CacheListener#sync()} are notified
* synchronously.
*
* @return thread pool size
@@ -750,11 +741,6 @@
return listenerAsyncPoolSize;
}
- public BuddyReplicationConfig getBuddyReplicationConfig()
- {
- return buddyReplicationConfig;
- }
-
public long getStateRetrievalTimeout()
{
return stateRetrievalTimeout;
@@ -891,8 +877,6 @@
if (useRegionBasedMarshalling != that.useRegionBasedMarshalling) return false;
if (useReplQueue != that.useReplQueue) return false;
if (usingMultiplexer != that.usingMultiplexer) return false;
- if (buddyReplicationConfig != null ? !buddyReplicationConfig.equals(that.buddyReplicationConfig) : that.buddyReplicationConfig != null)
- return false;
if (cacheLoaderConfig != null ? !cacheLoaderConfig.equals(that.cacheLoaderConfig) : that.cacheLoaderConfig != null)
return false;
if (cacheMode != that.cacheMode) return false;
@@ -944,7 +928,6 @@
result = 31 * result + (cacheLoaderConfig != null ? cacheLoaderConfig.hashCode() : 0);
result = 31 * result + (syncCommitPhase ? 1 : 0);
result = 31 * result + (syncRollbackPhase ? 1 : 0);
- result = 31 * result + (buddyReplicationConfig != null ? buddyReplicationConfig.hashCode() : 0);
result = 31 * result + (muxStackName != null ? muxStackName.hashCode() : 0);
result = 31 * result + (usingMultiplexer ? 1 : 0);
result = 31 * result + (runtimeConfig != null ? runtimeConfig.hashCode() : 0);
@@ -968,10 +951,6 @@
try
{
Configuration c = (Configuration) super.clone();
- if (buddyReplicationConfig != null)
- {
- c.setBuddyReplicationConfig(buddyReplicationConfig.clone());
- }
if (evictionConfig != null)
{
c.setEvictionConfig(evictionConfig.clone());
@@ -999,12 +978,6 @@
return getCacheLoaderConfig() != null && !getCacheLoaderConfig().getIndividualCacheLoaderConfigs().isEmpty();
}
- public boolean isUsingBuddyReplication()
- {
- return getBuddyReplicationConfig() != null && getBuddyReplicationConfig().isEnabled() &&
- getCacheMode() != Configuration.CacheMode.LOCAL;
- }
-
public String getMuxStackName()
{
return muxStackName;
@@ -1016,7 +989,7 @@
}
/**
- * Returns the {@link org.jboss.cache.config.CustomInterceptorConfig}, if any, associated with this configuration
+ * Returns the {@link org.horizon.config.CustomInterceptorConfig}, if any, associated with this configuration
* object. The custom interceptors will be added to the cache at startup in the sequence defined by this list.
*
* @return List of cutom interceptors, never null
@@ -1036,11 +1009,6 @@
this.customInterceptors = customInterceptors;
}
- public BuddyManager getConsistentHashing()
- {
- return null;
- }
-
public boolean isUsingEviction()
{
return getEvictionConfig() != null;
Modified: core/branches/flat/src/main/java/org/horizon/config/ConfigurationComponent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/ConfigurationComponent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/ConfigurationComponent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,17 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheStatus;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.CacheStatus;
+import org.horizon.CacheSPI;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
import java.util.Collection;
import java.util.Collections;
Modified: core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/ConfigurationException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/ConfigurationException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.util.ArrayList;
import java.util.List;
@@ -31,8 +31,8 @@
* configuration options or missing mandatory configuration elements.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
- * @see org.jboss.cache.config.Configuration
- * @see org.jboss.cache.CacheFactory
+ * @see Configuration
+ * @see org.horizon.manager.CacheManager
*/
public class ConfigurationException extends CacheException
{
Modified: core/branches/flat/src/main/java/org/horizon/config/ConfigurationRegistry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/ConfigurationRegistry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/ConfigurationRegistry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import java.util.Set;
Modified: core/branches/flat/src/main/java/org/horizon/config/CustomInterceptorConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/CustomInterceptorConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/CustomInterceptorConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import net.jcip.annotations.Immutable;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
+import org.horizon.interceptors.base.CommandInterceptor;
/**
* Holds information about the custom interceptors defined in the configuration file.
@@ -92,7 +92,7 @@
/**
* Put this interceptor at the specified index, after the default chain is built.
* If the index is not valid (negative or grater than the size of the chain)
- * an {@link org.jboss.cache.config.ConfigurationException} is thrown at construction time.
+ * an {@link ConfigurationException} is thrown at construction time.
*/
public void setIndex(int index)
{
Modified: core/branches/flat/src/main/java/org/horizon/config/Dynamic.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/Dynamic.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/Dynamic.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Modified: core/branches/flat/src/main/java/org/horizon/config/EvictionAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/EvictionAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/EvictionAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
/**
- * An interface used to configure an eviction algorithm. Replaces the deprecated {@link org.jboss.cache.config.EvictionPolicyConfig}.
+ * An interface used to configure an eviction algorithm. Replaces the deprecated {@link EvictionCacheConfig}.
* <p/>
- * In its most basic form, it is implemented by {@link org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase}, but
- * more specific eviction policies may subclass {@link org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase} or re-implement
+ * In its most basic form, it is implemented by {@link org.horizon.eviction.EvictionAlgorithmConfigBase}, but
+ * more specific eviction policies may subclass {@link org.horizon.eviction.EvictionAlgorithmConfigBase} or re-implement
* this interface to provide access to more config variables.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
@@ -34,7 +34,7 @@
public interface EvictionAlgorithmConfig extends CloneableConfigurationComponent
{
/**
- * Gets the class name of the {@link org.jboss.starobrno.eviction.EvictionAlgorithm} implementation
+ * Gets the class name of the {@link org.horizon.eviction.EvictionAlgorithm} implementation
* this object will configure.
*
* @return fully qualified class name
Modified: core/branches/flat/src/main/java/org/horizon/config/EvictionCacheConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/EvictionCacheConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/EvictionCacheConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/EvictionConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/EvictionConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.starobrno.eviction.DefaultEvictionAction;
+import org.horizon.eviction.DefaultEvictionAction;
import java.util.LinkedList;
import java.util.List;
@@ -111,15 +111,11 @@
/**
* Creates an EvictionRegionConfig for the
- * {@link org.jboss.cache.RegionManagerImpl#DEFAULT_REGION "_default_"} region using the
* {@link #getDefaultEvictionPolicyClass()} default eviction policy class}. Throws a
* {@link ConfigurationException} if
* {@link #setDefaultEvictionPolicyClass(String) a default eviction policy class}
* has not been set.
*
- * @return an EvictionRegionConfig whose FQN is {@link org.jboss.cache.RegionManagerImpl#DEFAULT_REGION}
- * and whose EvictionPolicyConfig is the default config for the
- * default eviction policy class.
* @throws ConfigurationException if a
* {@link #setDefaultEvictionPolicyClass(String) a default eviction policy class}
* has not been set or there is a problem instantiating the configuration.
Modified: core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/GlobalConfiguration.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/GlobalConfiguration.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.util.Properties;
Modified: core/branches/flat/src/main/java/org/horizon/config/MissingPolicyException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/MissingPolicyException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/MissingPolicyException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
public class MissingPolicyException extends ConfigurationException
{
Modified: core/branches/flat/src/main/java/org/horizon/config/NonOverridable.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/NonOverridable.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/NonOverridable.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.config;
+package org.horizon.config;
import java.lang.annotation.*;
Modified: core/branches/flat/src/main/java/org/horizon/config/OldFileFormatException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/OldFileFormatException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/OldFileFormatException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
/**
* This exception indicates that an old configuration file is passed to a parser that only knows how to handle newer
Modified: core/branches/flat/src/main/java/org/horizon/config/Option.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/Option.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/Option.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
/**
@@ -33,8 +33,6 @@
private boolean failSilently;
private boolean cacheModeLocal;
private boolean suppressLocking;
- private boolean forceDataGravitation;
- private boolean skipDataGravitation;
private boolean forceWriteLock;
private boolean skipCacheStatusCheck;
@@ -43,8 +41,6 @@
private boolean forceSynchronous;
private long syncReplTimeout = -1;
- private int groupRequestMode = -1;
-
private int lockAcquisitionTimeout = -1;
private boolean suppressPersistence;
@@ -107,48 +103,6 @@
}
/**
- * @since 1.4.0
- */
- public boolean getForceDataGravitation()
- {
- return forceDataGravitation;
- }
-
- /**
- * Enables data gravitation calls if a cache miss is detected when using <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheBuddyReplicationDesign">Buddy Replication</a>.
- * Enabled only for a given invocation, and only useful if <code>autoDataGravitation</code> is set to <code>false</code>.
- * See <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheBuddyReplicationDesign">Buddy Replication</a> documentation for more details.
- *
- * @since 1.4.0
- */
- public void setForceDataGravitation(boolean enableDataGravitation)
- {
- this.forceDataGravitation = enableDataGravitation;
- }
-
- /**
- * @return true if skipDataGravitation is set to true.
- * @since 1.4.1.SP6
- */
- public boolean isSkipDataGravitation()
- {
- return skipDataGravitation;
- }
-
- /**
- * Suppresses data gravitation when buddy replication is used. If true, overrides {@link #setForceDataGravitation(boolean)}
- * being set to true. Typically used to suppress gravitation calls when {@link org.jboss.cache.config.BuddyReplicationConfig#setAutoDataGravitation(boolean)}
- * is set to true.
- *
- * @param skipDataGravitation
- * @since 1.4.1.SP6
- */
- public void setSkipDataGravitation(boolean skipDataGravitation)
- {
- this.skipDataGravitation = skipDataGravitation;
- }
-
- /**
* Gets whether replication or invalidation should be done asynchronously,
* even if the cache is configured in a synchronous mode. Has no
* effect if the call is occuring within a transactional context.
@@ -239,8 +193,6 @@
", cacheModeLocal=" + cacheModeLocal +
", suppressLocking=" + suppressLocking +
", lockAcquisitionTimeout=" + lockAcquisitionTimeout +
- ", forceDataGravitation=" + forceDataGravitation +
- ", skipDataGravitation=" + skipDataGravitation +
", forceAsynchronous=" + forceAsynchronous +
", forceSynchronous=" + forceSynchronous +
'}';
@@ -282,10 +234,8 @@
final Option option = (Option) o;
- if (skipDataGravitation != option.skipDataGravitation) return false;
if (cacheModeLocal != option.cacheModeLocal) return false;
if (failSilently != option.failSilently) return false;
- if (forceDataGravitation != option.forceDataGravitation) return false;
if (suppressLocking != option.suppressLocking) return false;
if (forceWriteLock != option.forceWriteLock) return false;
if (forceAsynchronous != option.forceAsynchronous) return false;
@@ -302,8 +252,6 @@
result = (failSilently ? 1 : 0);
result = 29 * result + (cacheModeLocal ? 1 : 0);
result = 29 * result + (suppressLocking ? 1 : 0);
- result = 29 * result + (forceDataGravitation ? 1 : 0);
- result = 29 * result + (skipDataGravitation ? 1 : 0);
result = 29 * result + (forceWriteLock ? 0 : 1);
result = 29 * result + (forceAsynchronous ? 0 : 1);
result = 29 * result + (forceSynchronous ? 0 : 1);
@@ -317,10 +265,8 @@
*/
public void reset()
{
- this.skipDataGravitation = false;
this.cacheModeLocal = false;
this.failSilently = false;
- this.forceDataGravitation = false;
this.suppressLocking = false;
this.forceWriteLock = false;
this.forceAsynchronous = false;
@@ -330,7 +276,7 @@
}
/**
- * Forces a write lock to be acquired on the call, regardless of whether it is a read or write. Only applies to the {@link org.jboss.cache.interceptors.PessimisticLockInterceptor}
+ * Forces a write lock to be acquired on the call, regardless of whether it is a read or write.
*
* @param forceWriteLock
* @since 2.0.0
@@ -342,7 +288,7 @@
/**
- * Tests whether a write lock has been forced on the call, regardless of whether it is a read or write. Only applies to the {@link org.jboss.cache.interceptors.PessimisticLockInterceptor}
+ * Tests whether a write lock has been forced on the call, regardless of whether it is a read or write.
*
* @since 2.0.0
*/
@@ -371,8 +317,8 @@
}
/**
- * @return the value of the sync replication timeout (used when cache mode is either {@link org.jboss.cache.config.Configuration.CacheMode#REPL_SYNC}
- * or {@link org.jboss.cache.config.Configuration.CacheMode#INVALIDATION_SYNC}) to be used for this specific call, or -1 (default) if the
+ * @return the value of the sync replication timeout (used when cache mode is either {@link org.horizon.config.Configuration.CacheMode#REPL_SYNC}
+ * or {@link org.horizon.config.Configuration.CacheMode#INVALIDATION_SYNC}) to be used for this specific call, or -1 (default) if the
* default value in {@link Configuration#getSyncReplTimeout()} is to be used instead.
* @since 2.1.0
*/
@@ -382,8 +328,8 @@
}
/**
- * Used to override the value in {@link Configuration#getSyncReplTimeout()} (used when cache mode is either {@link org.jboss.cache.config.Configuration.CacheMode#REPL_SYNC}
- * or {@link org.jboss.cache.config.Configuration.CacheMode#INVALIDATION_SYNC}) for this specific invocation. Defaults to -1,
+ * Used to override the value in {@link Configuration#getSyncReplTimeout()} (used when cache mode is either {@link org.horizon.config.Configuration.CacheMode#REPL_SYNC}
+ * or {@link org.horizon.config.Configuration.CacheMode#INVALIDATION_SYNC}) for this specific invocation. Defaults to -1,
* which means use the default in the configuration.
*
* @param syncReplTimeout new timeout value for this invocation.
@@ -395,28 +341,6 @@
}
/**
- * @return overridden JGroups {@link org.jgroups.blocks.GroupRequest} mode to use, or -1 if the {@link org.jboss.cache.RPCManager}'s
- * own logic is to be used to select a group request mode (this is the default).
- * @since 2.1.0
- */
- public int getGroupRequestMode()
- {
- return groupRequestMode;
- }
-
- /**
- * By default, the {@link org.jboss.cache.RPCManager} has inbuilt logic when it comes to selecting a group request mode.
- * This can be overridden by setting the group request mode here, using this method, for a specific invocation.
- *
- * @param groupRequestMode a group request mode, found in the {@link org.jgroups.blocks.GroupRequest} class.
- * @since 2.1.0
- */
- public void setGroupRequestMode(int groupRequestMode)
- {
- this.groupRequestMode = groupRequestMode;
- }
-
- /**
* If set to true, any persistence to a cache loader will be suppressed for the current invocation only. Does not apply to transactional calls.
*
* @return true if persistence is suppressed.
Modified: core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/PluggableConfigurationComponent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/PluggableConfigurationComponent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
+import org.horizon.config.parsing.XmlConfigHelper;
import java.io.ByteArrayInputStream;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/config/RuntimeConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/RuntimeConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/RuntimeConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.util.Util;
+import org.horizon.remoting.RPCManager;
+import org.horizon.util.Util;
import org.jgroups.Channel;
import org.jgroups.ChannelFactory;
import org.jgroups.util.ThreadFactory;
@@ -41,7 +40,6 @@
private transient TransactionManager transactionManager;
private transient Channel channel;
private transient ChannelFactory muxChannelFactory;
- private transient BuddyGroup buddyGroup;
private RPCManager rpcManager;
private transient ThreadFactory evictionTimerThreadFactory;
private transient ExecutorService asyncSerializationExecutor;
@@ -185,7 +183,7 @@
}
/**
- * This is used to set the executor to use for async cache replucation, and effectively overrides {@link org.jboss.cache.config.Configuration#setSerializationExecutorPoolSize(int)}
+ * This is used to set the executor to use for async cache replucation, and effectively overrides {@link Configuration#setSerializationExecutorPoolSize(int)}
* <p/>
*
* @param asyncSerializationExecutor executor to set
@@ -210,7 +208,7 @@
}
/**
- * This is used to set the executor to use for async cache listeners, and effectively overrides {@link org.jboss.cache.config.Configuration#setListenerAsyncPoolSize(int)}
+ * This is used to set the executor to use for async cache listeners, and effectively overrides {@link Configuration#setListenerAsyncPoolSize(int)}
* <p/>
*
* @param asyncCacheListenerExecutor the executor to use for async cache listeners
@@ -258,16 +256,6 @@
return result;
}
- public void setBuddyGroup(BuddyGroup buddyGroup)
- {
- this.buddyGroup = buddyGroup;
- }
-
- public BuddyGroup getBuddyGroup()
- {
- return buddyGroup;
- }
-
public void setRPCManager(RPCManager rpcManager)
{
this.rpcManager = rpcManager;
@@ -283,6 +271,4 @@
{
return (RuntimeConfig) super.clone();
}
-
-
}
Modified: core/branches/flat/src/main/java/org/horizon/config/UnsupportedEvictionImplException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/UnsupportedEvictionImplException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/UnsupportedEvictionImplException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
/**
* Thrown if an eviction configuration that cannot be translated to the new 3.x eviction interfaces is used.
Modified: core/branches/flat/src/main/java/org/horizon/config/XmlParsingConfigurationRegistry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/XmlParsingConfigurationRegistry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/XmlParsingConfigurationRegistry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config;
+package org.horizon.config;
-import org.jboss.starobrno.config.parsing.CacheConfigsXmlParser;
+import org.horizon.config.parsing.CacheConfigsXmlParser;
import java.util.HashSet;
import java.util.Hashtable;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/CacheConfigsXmlParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/CacheConfigsXmlParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/CacheConfigsXmlParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.util.FileLookup;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.util.FileLookup;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/ConfigFilesConvertor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/ConfigFilesConvertor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/ConfigFilesConvertor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
-import org.jboss.starobrno.util.FileLookup;
+import org.horizon.util.FileLookup;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -47,7 +47,7 @@
/**
* Writes to the <b>os</b> the 3.x configuration file resulted by transforming the 2.x configuration file passed in
* as <b>is</b>. Transformation is performed according to the <b>xsltFile</b>. The xslt file is looked up using a
- * {@link org.jboss.starobrno.util.FileLookup}
+ * {@link org.horizon.util.FileLookup}
*/
public void parse(InputStream is, OutputStream os, String xsltFile) throws Exception
{
@@ -67,7 +67,7 @@
/**
* Writes to the <b>os</b> the 3.x configuration file resulted by transforming the 2.x configuration file passed in
* as <b>inputFile</b>. Transformation is performed according to the <b>xsltFile</b>. Both <b>inputFile</b> and he xslt
- * file are looked up using a {@link org.jboss.starobrno.util.FileLookup}
+ * file are looked up using a {@link org.horizon.util.FileLookup}
*/
public void parse(String inputFile, OutputStream os, String xsltFile) throws Exception
{
@@ -83,7 +83,7 @@
}
/**
- * usage : java org.jboss.cache.config.parsing.ConfigFilesConvertor -Dsource=config-2.x.xml -Ddestination=config-3.x.xnl
+ * usage : java ConfigFilesConvertor -Dsource=config-2.x.xml -Ddestination=config-3.x.xnl
*/
public static void main(String[] argv) throws Exception
{
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/JGroupsStackParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/JGroupsStackParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/JGroupsStackParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/ParsedAttributes.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/ParsedAttributes.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/ParsedAttributes.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.w3c.dom.Element;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/RootElementBuilder.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/RootElementBuilder.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/RootElementBuilder.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.ConfigurationException;
+import org.horizon.config.ConfigurationException;
import org.jboss.util.xml.JBossEntityResolver;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigHelper.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/XmlConfigHelper.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigHelper.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.util.BeanUtils;
+import org.horizon.config.ConfigurationException;
+import org.horizon.util.BeanUtils;
import org.jboss.util.StringPropertyReplacer;
import org.w3c.dom.*;
import org.xml.sax.InputSource;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/XmlConfigurationParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,8 +1,8 @@
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.GlobalConfiguration;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.GlobalConfiguration;
import java.io.IOException;
import java.io.InputStream;
@@ -42,9 +42,9 @@
Map<String, Configuration> parseNamedConfigurations() throws ConfigurationException;
/**
- * GlobalConfiguration would also have a reference to the template default configuration, accessible via {@link org.jboss.starobrno.config.GlobalConfiguration#getDefaultConfiguration()}
+ * GlobalConfiguration would also have a reference to the template default configuration, accessible via {@link org.horizon.config.GlobalConfiguration#getDefaultConfiguration()}
* <p/>
- * This is typically used to configure a {@link org.jboss.starobrno.manager.CacheManager}
+ * This is typically used to configure a {@link org.horizon.manager.CacheManager}
*
* @return a GlobalConfiguration as parsed from the configuration file.
*/
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/XmlConfigurationParserImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.GlobalConfiguration;
-import org.jboss.starobrno.util.FileLookup;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.GlobalConfiguration;
+import org.horizon.util.FileLookup;
import org.w3c.dom.Element;
import java.io.FileNotFoundException;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserJBC3.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/XmlConfigurationParserJBC3.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlConfigurationParserJBC3.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.config.*;
-import org.jboss.starobrno.config.Configuration.CacheMode;
-import org.jboss.starobrno.config.parsing.element.BuddyElementParser;
-import org.jboss.starobrno.config.parsing.element.CustomInterceptorsElementParser;
-import org.jboss.starobrno.config.parsing.element.EvictionElementParser;
-import org.jboss.starobrno.config.parsing.element.LoadersElementParser;
-import org.jboss.starobrno.util.FileLookup;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.config.*;
+import org.horizon.config.Configuration.CacheMode;
+import org.horizon.config.parsing.element.BuddyElementParser;
+import org.horizon.config.parsing.element.CustomInterceptorsElementParser;
+import org.horizon.config.parsing.element.EvictionElementParser;
+import org.horizon.config.parsing.element.LoadersElementParser;
+import org.horizon.util.FileLookup;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.ErrorHandler;
@@ -38,7 +38,7 @@
import java.util.List;
/**
- * Reads in XMLconfiguration files and spits out a {@link org.jboss.cache.config.Configuration} object.
+ * Reads in XMLconfiguration files and spits out a {@link Configuration} object.
* By default this class uses a validating parser (configurable).
* <p/>
* Following system properties can be used for customizing parser behavior:
@@ -49,7 +49,7 @@
* This class is stateful and one instance should be used for parsing a single configuration file.
*
* @author Mircea.Markus at jboss.com
- * @see org.jboss.cache.config.parsing.RootElementBuilder
+ * @see RootElementBuilder
* @since 3.0
*/
public class XmlConfigurationParserJBC3 extends XmlParserBase
@@ -91,9 +91,9 @@
/**
* Parses an XML file and returns a new configuration.
- * For looking up the file, {@link org.jboss.starobrno.util.FileLookup} is used.
+ * For looking up the file, {@link org.horizon.util.FileLookup} is used.
*
- * @see org.jboss.starobrno.util.FileLookup
+ * @see org.horizon.util.FileLookup
*/
public Configuration parseFile(String filename)
{
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/XmlParserBase.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/XmlParserBase.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing;
+package org.horizon.config.parsing;
import org.jboss.util.StringPropertyReplacer;
import org.w3c.dom.Element;
Deleted: core/branches/flat/src/main/java/org/horizon/config/parsing/element/BuddyElementParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/element/BuddyElementParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/element/BuddyElementParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.config.parsing.element;
-
-import org.jboss.cache.buddyreplication.NextMemberBuddyLocator;
-import org.jboss.starobrno.config.BuddyReplicationConfig;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
-import org.jboss.starobrno.config.parsing.XmlParserBase;
-import org.w3c.dom.Element;
-
-import java.util.Properties;
-
-/**
- * Utility class for parsing 'buddy' element in the .xml configuration file.
- * <pre>
- * Note: class does not rely on element position in the configuration file.
- * It does not rely on element's name either.
- * </pre>
- *
- * @author Mircea.Markus at jboss.com
- * @since 3.0
- */
-public class BuddyElementParser extends XmlParserBase
-{
- public BuddyReplicationConfig parseBuddyElement(Element element)
- {
- BuddyReplicationConfig brc = new BuddyReplicationConfig();
- String enabled = getAttributeValue(element, "enabled");
- brc.setEnabled(getBoolean(enabled));
- String buddyPoolName = getAttributeValue(element, "poolName");
- if (existsAttribute(buddyPoolName)) brc.setBuddyPoolName(buddyPoolName);
- String buddyCommunicationTimeout = getAttributeValue(element, "communicationTimeout");
- if (existsAttribute(buddyCommunicationTimeout))
- brc.setBuddyCommunicationTimeout(getInt(buddyCommunicationTimeout));
-
- parseDataGravitationElement(getSingleElementInCoreNS("dataGravitation", element), brc);
- BuddyReplicationConfig.BuddyLocatorConfig blc = parseBuddyLocatorConfig(getSingleElementInCoreNS("locator", element));
- brc.setBuddyLocatorConfig(blc);
- return brc;
- }
-
- private BuddyReplicationConfig.BuddyLocatorConfig parseBuddyLocatorConfig(Element element)
- {
- if (element == null) return defaultBuddyLocatorConfig();
- BuddyReplicationConfig.BuddyLocatorConfig result = new BuddyReplicationConfig.BuddyLocatorConfig();
- String buddyLocatorClass = getAttributeValue(element, "class");
- if (existsAttribute(buddyLocatorClass)) result.setBuddyLocatorClass(buddyLocatorClass);
- Properties existing = new Properties();
- Properties configured = XmlConfigHelper.readPropertiesContents(element, "properties");
- existing.putAll(configured);
- result.setBuddyLocatorClass(buddyLocatorClass);
- result.setBuddyLocatorProperties(existing);
- return result;
- }
-
- private BuddyReplicationConfig.BuddyLocatorConfig defaultBuddyLocatorConfig()
- {
- BuddyReplicationConfig.BuddyLocatorConfig result = new BuddyReplicationConfig.BuddyLocatorConfig();
- result.setBuddyLocatorClass(NextMemberBuddyLocator.class.getName());
- Properties props = new Properties();
- result.setBuddyLocatorProperties(props);
- return result;
- }
-
- private void parseDataGravitationElement(Element element, BuddyReplicationConfig brc)
- {
- if (element == null) return;
- String auto = getAttributeValue(element, "auto");
- if (existsAttribute(auto)) brc.setAutoDataGravitation(getBoolean(auto));
- String removeOnFind = getAttributeValue(element, "removeOnFind");
- if (existsAttribute(removeOnFind)) brc.setDataGravitationRemoveOnFind(getBoolean(removeOnFind));
- String searchBackupTrees = getAttributeValue(element, "searchBackupTrees");
- if (existsAttribute(searchBackupTrees)) brc.setDataGravitationSearchBackupTrees(getBoolean(searchBackupTrees));
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/element/CustomInterceptorsElementParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/element/CustomInterceptorsElementParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/element/CustomInterceptorsElementParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing.element;
+package org.horizon.config.parsing.element;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.CustomInterceptorConfig;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
-import org.jboss.starobrno.config.parsing.XmlParserBase;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.util.Util;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.CustomInterceptorConfig;
+import org.horizon.config.parsing.XmlConfigHelper;
+import org.horizon.config.parsing.XmlParserBase;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.util.Util;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/element/EvictionElementParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/element/EvictionElementParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/element/EvictionElementParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing.element;
+package org.horizon.config.parsing.element;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.config.EvictionCacheConfig;
-import org.jboss.starobrno.config.EvictionConfig;
-import org.jboss.starobrno.config.MissingPolicyException;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
-import org.jboss.starobrno.config.parsing.XmlParserBase;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.config.EvictionCacheConfig;
+import org.horizon.config.EvictionConfig;
+import org.horizon.config.MissingPolicyException;
+import org.horizon.config.parsing.XmlConfigHelper;
+import org.horizon.config.parsing.XmlParserBase;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Modified: core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/config/parsing/element/LoadersElementParser.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/config/parsing/element/LoadersElementParser.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.config.parsing.element;
+package org.horizon.config.parsing.element;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
-import org.jboss.starobrno.config.parsing.XmlParserBase;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.parsing.XmlConfigHelper;
+import org.horizon.config.parsing.XmlParserBase;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Copied: core/branches/flat/src/main/java/org/horizon/container (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/container)
Modified: core/branches/flat/src/main/java/org/horizon/container/DataContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/DataContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/DataContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
import java.util.Set;
Modified: core/branches/flat/src/main/java/org/horizon/container/MVCCEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/MVCCEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/MVCCEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.context.InvocationContext;
import java.util.Map.Entry;
Modified: core/branches/flat/src/main/java/org/horizon/container/NullMarkerEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/NullMarkerEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/NullMarkerEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
/**
* A marker node to represent a null node for repeatable read, so that a read that returns a null can continue to return
Modified: core/branches/flat/src/main/java/org/horizon/container/ReadCommittedEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/ReadCommittedEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/ReadCommittedEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.jboss.starobrno.container.ReadCommittedEntry.Flags.*;
-import org.jboss.starobrno.context.InvocationContext;
+import static org.horizon.container.ReadCommittedEntry.Flags.*;
+import org.horizon.context.InvocationContext;
/**
* A node delegate that encapsulates read committed semantics when writes are initiated, committed or rolled back.
Modified: core/branches/flat/src/main/java/org/horizon/container/RepeatableReadEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/RepeatableReadEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/RepeatableReadEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import static org.jboss.starobrno.container.ReadCommittedEntry.Flags.CHANGED;
+import org.horizon.CacheException;
+import static org.horizon.container.ReadCommittedEntry.Flags.CHANGED;
/**
* A node delegate that encapsulates repeatable read semantics when writes are initiated, committed or rolled back.
Modified: core/branches/flat/src/main/java/org/horizon/container/UnsortedDataContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/container/UnsortedDataContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/container/UnsortedDataContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.container;
+package org.horizon.container;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Copied: core/branches/flat/src/main/java/org/horizon/context (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/context)
Modified: core/branches/flat/src/main/java/org/horizon/context/EntryLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/context/EntryLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/context/EntryLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.context;
+package org.horizon.context;
-import org.jboss.starobrno.container.MVCCEntry;
+import org.horizon.container.MVCCEntry;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/context/InvocationContext.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/context/InvocationContext.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/context/InvocationContext.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.context;
+package org.horizon.context;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.config.Option;
+import org.horizon.transaction.GlobalTransaction;
import javax.transaction.Transaction;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/context/InvocationContextImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/context/InvocationContextImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.context;
+package org.horizon.context;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jboss.starobrno.util.FastCopyHashMap;
-import org.jboss.starobrno.util.Immutables;
+import org.horizon.config.Option;
+import org.horizon.container.MVCCEntry;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
+import org.horizon.util.FastCopyHashMap;
+import org.horizon.util.Immutables;
import javax.transaction.Transaction;
import java.util.Collections;
@@ -68,7 +68,7 @@
/**
* Retrieves a node from the registry of looked up nodes in the current scope.
* <p/>
- * If a transaction is in progress, implementations should delegate to {@link org.jboss.starobrno.context.TransactionContext#lookupEntry(Object)}
+ * If a transaction is in progress, implementations should delegate to {@link org.horizon.context.TransactionContext#lookupEntry(Object)}
* <p/>
*
* @param k key to look up
@@ -101,7 +101,7 @@
/**
* Puts an entry in the registry of looked up nodes in the current scope.
* <p/>
- * If a transaction is in progress, implementations should delegate to {@link TransactionContext#putLookedUpEntry(Object, org.jboss.starobrno.container.MVCCEntry)}
+ * If a transaction is in progress, implementations should delegate to {@link TransactionContext#putLookedUpEntry(Object, org.horizon.container.MVCCEntry)}
* <p/>
*
* @param key
@@ -141,7 +141,7 @@
/**
* Retrieves a map of nodes looked up within the current invocation's scope.
* <p/>
- * If a transaction is in progress, implementations should delegate to {@link org.jboss.cache.transaction.MVCCTransactionContext#getLookedUpNodes()}.
+ * If a transaction is in progress, implementations should delegate to {@link org.horizon.context.TransactionContext#getLookedUpEntries()}.
* <p/>
*
* @return a map of looked up nodes.
@@ -279,12 +279,8 @@
/**
* Returns an immutable, defensive copy of the List of locks currently maintained for the current scope.
* <p/>
- * Note that if a transaction is in scope, implementations should retrieve these locks from the {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should retrieve these locks from the {@link TransactionContext}.
* Retrieving locks from this method should always ensure they are retrieved from the appropriate scope.
- * <p/>
- * Note that currently (as of 3.0.0) this list is unchecked. This is to allow support for both MVCC (which uses Fqns as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to return <tt>List<Fqn></tt>.
*
* @return locks held in current scope.
*/
@@ -299,13 +295,9 @@
/**
* Adds a List of locks to the currently maintained collection of locks acquired.
* <p/>
- * Note that if a transaction is in scope, implementations should record locks on the {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should record locks on the {@link TransactionContext}.
* Adding locks using this method should always ensure they are applied to the appropriate scope.
* <p/>
- * Note that currently (as of 3.0.0) this list is unchecked. This is to allow support for both MVCC (which uses Fqns as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to accept <tt>List<Fqn></tt>.
- *
* @param locks locks to add
*/
@SuppressWarnings("unchecked")
@@ -327,7 +319,7 @@
/**
* Adds a lock to the currently maintained collection of locks acquired.
* <p/>
- * Note that if a transaction is in scope, implementations should record this lock on the {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should record this lock on the {@link TransactionContext}.
* Using this method should always ensure that the appropriate scope is used.
* <p/>
*
@@ -352,7 +344,7 @@
/**
* Removes a lock from the currently maintained collection of locks acquired.
* <p/>
- * Note that if a transaction is in scope, implementations should remove this lock from the {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should remove this lock from the {@link TransactionContext}.
* Using this method should always ensure that the lock is removed from the appropriate scope.
* <p/>
*
@@ -376,7 +368,7 @@
/**
* Clears all locks from the currently maintained collection of locks acquired.
* <p/>
- * Note that if a transaction is in scope, implementations should clear locks from the {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should clear locks from the {@link TransactionContext}.
* Using this method should always ensure locks are cleared in the appropriate scope.
* <p/>
*/
@@ -395,7 +387,7 @@
}
/**
- * Note that if a transaction is in scope, implementations should test this lock from on {@link org.jboss.cache.transaction.TransactionContext}.
+ * Note that if a transaction is in scope, implementations should test this lock from on {@link TransactionContext}.
* Using this method should always ensure locks checked in the appropriate scope.
*
* @param lock lock to test
Modified: core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/context/TransactionContext.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/context/TransactionContext.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.context;
+package org.horizon.context;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.config.Option;
+import org.horizon.transaction.GlobalTransaction;
import javax.transaction.Transaction;
import java.util.List;
@@ -35,7 +35,7 @@
* <p/>
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @see org.jboss.cache.InvocationContext
+ * @see InvocationContext
*/
public interface TransactionContext extends EntryLookup
{
@@ -102,15 +102,10 @@
/**
* Adds a lock to the currently maintained collection of locks acquired.
* <p/>
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#addLock(Object)} instead,
+ * Most code could not use this method directly, but use {@link InvocationContext#addKeyLocked(Object)} instead,
* which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
- * <p/>
- * Note that currently (as of 3.0.0) this lock is weakly typed. This is to allow support for both MVCC (which uses {@link org.jboss.cache.Fqn}s as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to accept {@link org.jboss.cache.Fqn}.
*
* @param lock lock to add
- * @see org.jboss.cache.InvocationContext#addLock(Object)
*/
@SuppressWarnings("unchecked")
void addKeyLocked(Object lock);
@@ -118,15 +113,10 @@
/**
* Removes a lock from the currently maintained collection of locks acquired.
* <p/>
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#removeLock(Object)} instead,
+ * Most code could not use this method directly, but use {@link InvocationContext#removeKeyLocked(Object)} instead,
* which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
- * <p/>
- * Note that currently (as of 3.0.0) this lock is weakly typed. This is to allow support for both MVCC (which uses {@link org.jboss.cache.Fqn}s as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to accept {@link org.jboss.cache.Fqn}.
*
* @param lock lock to remove
- * @see org.jboss.cache.InvocationContext#removeLock(Object)
*/
@SuppressWarnings("unchecked")
void removeKeyLocked(Object lock);
@@ -134,29 +124,18 @@
/**
* Clears all locks from the currently maintained collection of locks acquired.
* <p/>
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#clearLocks()} instead,
+ * Most code could not use this method directly, but use {@link InvocationContext#clearKeysLocked()} instead,
* which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
- * <p/>
- * Note that currently (as of 3.0.0) this lock is weakly typed. This is to allow support for both MVCC (which uses {@link org.jboss.cache.Fqn}s as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to accept {@link org.jboss.cache.Fqn}.
- *
- * @see org.jboss.cache.InvocationContext#clearLocks()
*/
void clearKeysLocked();
/**
* Adds a List of locks to the currently maintained collection of locks acquired.
* <p/>
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#addAllLocks(java.util.List)} instead,
+ * Most code could not use this method directly, but use {@link InvocationContext#addAllKeysLocked(java.util.List)} instead,
* which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
- * <p/>
- * Note that currently (as of 3.0.0) this list is unchecked. This is to allow support for both MVCC (which uses Fqns as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to accept <tt>List<Fqn></tt>.
*
* @param newLocks locks to add
- * @see org.jboss.cache.InvocationContext#addAllLocks(java.util.List)
*/
@SuppressWarnings("unchecked")
void addAllKeysLocked(List<Object> newLocks);
@@ -164,21 +143,16 @@
/**
* Returns an immutable, defensive copy of the List of locks currently maintained for the transaction.
* <p/>
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#getLocks()} instead,
- * which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
- * <p/>
- * Note that currently (as of 3.0.0) this list is unchecked. This is to allow support for both MVCC (which uses Fqns as locks)
- * as well as legacy Optimistic and Pessimistic Locking schemes (which use {@link org.jboss.cache.lock.NodeLock} as locks). Once support for
- * legacy node locking schemes are dropped, this method will be more strongly typed to return <tt>List<Fqn></tt>.
+ * Most code could not use this method directly, but use {@link org.horizon.context.InvocationContext#getKeysLocked()}
+ * instead, which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
*
* @return locks held in current scope.
- * @see org.jboss.cache.InvocationContext#getLocks()
*/
@SuppressWarnings("unchecked")
List<Object> getKeysLocked();
/**
- * Most code could not use this method directly, but use {@link org.jboss.cache.InvocationContext#hasLock(Object)} ()} instead,
+ * Most code could not use this method directly, but use {@link InvocationContext#hasLockedKey(Object)} ()} instead,
* which would delegate to this method if a transaction is in scope or otherwise use invocation-specific locks.
*
* @param lock lock to test
@@ -187,38 +161,28 @@
boolean hasLockedKey(Object lock);
/**
- * Gets the value of the forceAsyncReplication flag. Used by ReplicationInterceptor and OptimisticReplicationInterceptor
- * when dealing with {@link org.jboss.cache.Cache_Legacy#putForExternalRead(org.jboss.cache.Fqn,Object,Object)} within
- * a transactional context.
- *
+ * Gets the value of the forceAsyncReplication flag.
+ *
* @return true if the forceAsyncReplication flag is set to true.
*/
boolean isForceAsyncReplication();
/**
- * Sets the value of the forceAsyncReplication flag. Used by ReplicationInterceptor and OptimisticReplicationInterceptor
- * when dealing with {@link org.jboss.cache.Cache_Legacy#putForExternalRead(org.jboss.cache.Fqn,Object,Object)} within
- * a transactional context. Also used by OptimisticReplicationInterceptor when dealing
- * with {@link org.jboss.cache.config.Option#setForceAsynchronous(boolean)} in a
- * non-transactional context (i.e. with an implicit transaction).
+ * Sets the value of the forceAsyncReplication flag.
*
* @param forceAsyncReplication value of forceAsyncReplication
*/
void setForceAsyncReplication(boolean forceAsyncReplication);
/**
- * Gets the value of the forceSyncReplication flag. Used by ReplicationInterceptor and OptimisticReplicationInterceptor
- * when dealing with {@link org.jboss.cache.Cache_Legacy#putForExternalRead(org.jboss.cache.Fqn,Object,Object)} within
- * a transactional context.
+ * Gets the value of the forceSyncReplication flag.
*
* @return true if the forceAsyncReplication flag is set to true.
*/
boolean isForceSyncReplication();
/**
- * Sets the value of the forceSyncReplication flag. Used by ReplicationInterceptor and OptimisticReplicationInterceptor
- * when dealing with {@link org.jboss.cache.Cache_Legacy#putForExternalRead(org.jboss.cache.Fqn,Object,Object)} within
- * a transactional context.
+ * Sets the value of the forceSyncReplication flag.
*
* @param forceSyncReplication value of forceSyncReplication
*/
Modified: core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/context/TransactionContextImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/context/TransactionContextImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.context;
+package org.horizon.context;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.util.FastCopyHashMap;
-import org.jboss.starobrno.util.Immutables;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.config.Option;
+import org.horizon.container.MVCCEntry;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.util.FastCopyHashMap;
+import org.horizon.util.Immutables;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
@@ -55,7 +55,7 @@
private boolean forceSyncReplication = false;
/**
- * List<ReversibleCommand> of modifications ({@link org.jboss.cache.commands.WriteCommand}). They will be replicated on TX commit
+ * List<VisitableCommand> of modifications. They will be replicated on TX commit
*/
private List<VisitableCommand> modificationList;
/**
@@ -91,16 +91,6 @@
ltx = tx;
}
- /**
- * Retrieves a node from the registry of looked up nodes in the current scope.
- * <p/>
- * This is not normally called directly since {@link org.jboss.cache.InvocationContext#lookUpNode(org.jboss.cache.Fqn)}
- * would delegate to this method if a transaction is in scope.
- * <p/>
- *
- * @param key fqn to look up
- * @return a node, or null if it cannot be found.
- */
public MVCCEntry lookupEntry(Object key)
{
return lookedUpEntries.get(key);
@@ -111,41 +101,16 @@
lookedUpEntries.remove(key);
}
- /**
- * Puts an entry in the registry of looked up nodes in the current scope.
- * <p/>
- * This is not normally called directly since {@link org.jboss.cache.InvocationContext#putLookedUpNode(org.jboss.cache.Fqn, org.jboss.cache.NodeSPI)}
- * would delegate to this method if a transaction is in scope.
- * <p/>
- *
- * @param key key to put
- */
public void putLookedUpEntry(Object key, MVCCEntry entry)
{
lookedUpEntries.put(key, entry);
}
- /**
- * Clears the registry of looked up nodes.
- * <p/>
- * This is not normally called directly since {@link org.jboss.cache.InvocationContext#clearLookedUpNodes()}
- * would delegate to this method if a transaction is in scope.
- * <p/>
- */
public void clearLookedUpEntries()
{
lookedUpEntries.clear();
}
- /**
- * Retrieves a map of nodes looked up within the current invocation's scope.
- * <p/>
- * This is not normally called directly since {@link org.jboss.cache.InvocationContext#getLookedUpNodes()}
- * would delegate to this method if a transaction is in scope.
- * <p/>
- *
- * @return a map of looked up nodes.
- */
public Map<Object, MVCCEntry> getLookedUpEntries()
{
return lookedUpEntries;
Copied: core/branches/flat/src/main/java/org/horizon/eviction (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/eviction)
Modified: core/branches/flat/src/main/java/org/horizon/eviction/DefaultEvictionAction.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/DefaultEvictionAction.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/DefaultEvictionAction.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
/**
- * Default eviction action policy that calls {@link org.jboss.cache.Cache_Legacy#evict(org.jboss.cache.Fqn)} to evict a node.
+ * Default eviction action policy that calls {@link Cache#evict(Object)} to evict a node.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 3.0
Modified: core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/ElementSizeAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.Dynamic;
-import org.jboss.starobrno.eviction.algorithms.ElementSizeAlgorithm;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.Dynamic;
+import org.horizon.eviction.algorithms.ElementSizeAlgorithm;
/**
- * Configuration for {@link org.jboss.starobrno.eviction.algorithms.ElementSizeAlgorithm}.
+ * Configuration for {@link org.horizon.eviction.algorithms.ElementSizeAlgorithm}.
* <p/>
* Requires a positive "maxElementsPerNode" value otherwise a ConfigurationException is thrown.
*
Modified: core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/ElementSizeQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/ElementSizeQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.eviction.algorithms.SortedEvictionQueue;
+import org.horizon.eviction.algorithms.SortedEvictionQueue;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionAction.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionAction.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionAction.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
/**
* Performs an eviction on a given Fqn.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.EvictionEvent.Type;
+import org.horizon.CacheSPI;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.EvictionEvent.Type;
import java.util.concurrent.BlockingQueue;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithmConfigBase.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionAlgorithmConfigBase.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionAlgorithmConfigBase.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.cache.annotations.Compat;
-import org.jboss.starobrno.config.ConfigurationComponent;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.Dynamic;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
+import org.horizon.config.ConfigurationComponent;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.Dynamic;
+import org.horizon.config.EvictionAlgorithmConfig;
import java.util.concurrent.TimeUnit;
@@ -91,13 +90,6 @@
minTimeToLive = timeUnit.toMillis(time);
}
- @Deprecated
- @Compat
- public void setMinTimeToLiveSeconds(long time)
- {
- setMinTimeToLive(time, TimeUnit.SECONDS);
- }
-
public void validate() throws ConfigurationException
{
if (evictionAlgorithmClassName == null)
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionCacheManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.config.EvictionCacheConfig;
+import org.horizon.config.EvictionCacheConfig;
/**
* There is one eviction manager per cache.
@@ -33,27 +33,15 @@
EvictionEvent registerEvictionEvent(K key, EvictionEvent.Type eventType, int elementDifference);
/**
- * An overloaded version of {@link #registerEvictionEvent(String, org.jboss.starobrno.eviction.EvictionEvent.Type, int)} which
+ * An overloaded version of {@link #registerEvictionEvent(Object, org.horizon.eviction.EvictionEvent.Type, int)} which
* uses a default elementDifference value.
*
- * @param eventType passed in to the constructor of {@link org.jboss.starobrno.eviction.EvictionEvent}
+ * @param eventType passed in to the constructor of {@link org.horizon.eviction.EvictionEvent}
* @return an EvictedEventNode that has been created for this queue
*/
EvictionEvent registerEvictionEvent(K key, EvictionEvent.Type eventType);
/**
- * Marks a {@link org.jboss.cache.Node} as currently in use, by adding an event to the eviction queue.
- * If there is an {@link org.jboss.cache.config.EvictionRegionConfig} associated with this cahe, and
- * it respects this event (e.g., {@link org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm} does), then the {@link org.jboss.cache.Node} will not
- * be evicted until {@link #unmarkNodeCurrentlyInUse(Fqn)} is invoked.
- * <p/>
- * This mechanism can be used to prevent eviction of data that the application
- * is currently using, in the absence of any locks on the {@link org.jboss.cache.Node} where the
- * data is stored.
- */
- void markNodeCurrentlyInUse(K key, long timeout);
-
- /**
* Adds an event to the eviction queue indicating that a node is no longer in use.
*
* @param key Fqn of the node.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManagerImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionCacheManagerImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionCacheManagerImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.config.EvictionCacheConfig;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.util.Util;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.config.EvictionCacheConfig;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.util.Util;
+import org.horizon.CacheSPI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
/**
- * An eviction event records activity on nodes in the cache. These are recorded on a {@link org.jboss.cache.Region} for processing
- * later by calls to {@link org.jboss.cache.Region#processEvictionQueues()}.
- * <p/>
- *
- * @see org.jboss.cache.Region
+ * An eviction event records activity on nodes in the cache. These are recorded for processing
+ * later.
*/
public class EvictionEvent<K>
{
@@ -116,7 +113,6 @@
*
* @param key new Fqn root to use
* @return a new EvictedEventNode instance
- * @see org.jboss.cache.Region#copy(org.jboss.cache.Fqn)
*/
public EvictionEvent copy(K key)
{
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
/**
* @author Ben Wang, Feb 11, 2004
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionManagerImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionManagerImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionManagerImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
import net.jcip.annotations.ThreadSafe;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.EvictionManager;
+import org.horizon.EvictionManager;
import java.util.HashMap;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
/**
* Eviction Queue interface defines a contract for the Eviction Queue implementations used by EvictionPolicies.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/EvictionTimerTask.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/EvictionTimerTask.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionTimerTask.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.EvictionManager;
+import org.horizon.EvictionManager;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
Copied: core/branches/flat/src/main/java/org/horizon/eviction/EvictionWatcher.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/eviction/EvictionWatcher.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/eviction/EvictionWatcher.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/eviction/EvictionWatcher.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,53 @@
+package org.horizon.eviction;
+
+import org.horizon.Cache;
+import org.horizon.notifications.annotation.CacheEntryEvicted;
+import org.horizon.notifications.annotation.CacheListener;
+import org.horizon.notifications.event.CacheEntryEvictedEvent;
+import org.horizon.tree.Fqn;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Watches and waits for eviction events
+ *
+ * @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik AT jboss DOT org</a>)
+ * @since 3.0
+ */
+ at CacheListener
+public class EvictionWatcher
+{
+ Cache<?, ?> cache;
+ List<Object> keysToWaitFor;
+
+ public EvictionWatcher(Cache<?, ?> cache, Fqn... keysToWaitFor)
+ {
+// this(cache, Arrays.asList(keysToWaitFor));
+ }
+
+ public EvictionWatcher(Cache<?, ?> cache, List<Object> keysToWaitFor)
+ {
+ this.cache = cache;
+ this.keysToWaitFor = new ArrayList<Object>(keysToWaitFor);
+ cache.addCacheListener(this);
+ }
+
+ @CacheEntryEvicted
+ public void receive(CacheEntryEvictedEvent ee)
+ {
+ boolean xpect = false;
+ if (ee.isPre() && keysToWaitFor.contains(ee.getKey()))
+ {
+ xpect = true;
+ keysToWaitFor.remove(ee.getKey());
+ }
+
+ if (ee.isPre()) System.out.println("Saw " + ee.getKey() + " was expecting? " + xpect);
+ }
+
+ public boolean allNodesEvicted()
+ {
+ return keysToWaitFor.isEmpty();
+ }
+}
\ No newline at end of file
Property changes on: core/branches/flat/src/main/java/org/horizon/eviction/EvictionWatcher.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/eviction/ExpirationAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/ExpirationAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/ExpirationAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
-import org.jboss.cache.annotations.Compat;
-import org.jboss.starobrno.config.Dynamic;
-import org.jboss.starobrno.eviction.algorithms.ExpirationAlgorithm;
+import org.horizon.config.Dynamic;
+import org.horizon.eviction.algorithms.ExpirationAlgorithm;
import java.util.concurrent.TimeUnit;
@@ -113,13 +112,6 @@
this.timeToLive = timeUnit.toMillis(timeToLive);
}
- @Deprecated
- @Compat
- public void setTimeToLiveSeconds(long time)
- {
- setTimeToLive(time, TimeUnit.SECONDS);
- }
-
@Override
public ExpirationAlgorithmConfig clone() throws CloneNotSupportedException
{
Copied: core/branches/flat/src/main/java/org/horizon/eviction/FIFOPolicyTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/eviction/FIFOPolicyTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/eviction/FIFOPolicyTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/eviction/FIFOPolicyTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,147 @@
+package org.horizon.eviction;
+
+import org.horizon.lock.IsolationLevel;
+import org.horizon.CacheSPI;
+import org.jboss.starobrno.UnitTestCacheFactory;
+import org.horizon.config.Configuration;
+import org.horizon.config.EvictionCacheConfig;
+import org.horizon.config.EvictionConfig;
+import org.horizon.eviction.algorithms.fifo.FIFOAlgorithmConfig;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Mircea.Markus at jboss.com
+ */
+ at Test(groups = "functional")
+public class FIFOPolicyTest
+{
+ CacheSPI<Object, Object> cache;
+ final String CACHE_NAME = "test";
+ Throwable t1_ex, t2_ex;
+ volatile boolean isTrue;
+ int maxNodes = 5;
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp() throws Exception
+ {
+ initCaches();
+ t1_ex = t2_ex = null;
+ isTrue = true;
+ }
+
+ private void log(String s)
+ {
+ System.out.println("---log :" + s);
+ }
+
+ void initCaches() throws Exception
+ {
+
+ Configuration config = new Configuration();
+ EvictionConfig evConfig = new EvictionConfig();
+ evConfig.setWakeupInterval(-1);//external thread
+ config.setEvictionConfig(evConfig);
+ config.setCacheMode(Configuration.CacheMode.LOCAL);
+ FIFOAlgorithmConfig algorithmConfig = new FIFOAlgorithmConfig(maxNodes);
+ EvictionCacheConfig ecc = new EvictionCacheConfig(2000000, algorithmConfig, EvictionConfig.EVICTION_ACTION_CLASS_DEFAULT);
+ config.addEvictionCacheConfig(this.CACHE_NAME, ecc);
+ config.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ config.setIsolationLevel(IsolationLevel.REPEATABLE_READ);
+ cache = (CacheSPI<Object, Object>) new UnitTestCacheFactory<Object, Object>().createCache(config, true);
+ }
+
+ @AfterMethod(alwaysRun = true)
+ public void tearDown() throws Exception
+ {
+ TestingUtil.killCaches(cache);
+ cache = null;
+ }
+
+ public void testEviction()
+ {
+ String rootStr = "root";
+ for (int i = 0; i < 10; i++)
+ {
+ String str = rootStr + i;
+ try
+ {
+ cache.put(str, str);
+ }
+ catch (Exception e)
+ {
+ fail("Failed to insert data" + e);
+ e.printStackTrace();
+ }
+ }
+ cache.getEvictionManager().runEviction();
+
+ try
+ {
+ String val = (String) cache.get(rootStr + "3");
+ assertNull("DataNode should be empty ", val);
+ assertNull(cache.get(rootStr + "1"));
+ assertNull(cache.get(rootStr + "2"));
+ assertNull(cache.get(rootStr + "0"));
+ assertNull(cache.get(rootStr + "4"));
+
+ assertNotNull(cache.get(rootStr + "5"));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Failed to get" + e);
+ }
+ }
+
+ public void testNodeVisited() throws InterruptedException
+ {
+ String rootStr = "root";
+ List<Object> keysToBeEvicted = new ArrayList<Object>();
+ for (int i = 0; i < 5; i++) keysToBeEvicted.add(rootStr + i);
+ EvictionWatcher watcher = new EvictionWatcher(cache, keysToBeEvicted);
+
+ for (int i = 0; i < 10; i++)
+ {
+ String str = rootStr + i;
+ try
+ {
+ cache.put(str, str);
+ }
+ catch (Exception e)
+ {
+ fail("Failed to insert data" + e);
+ e.printStackTrace();
+ }
+ }
+
+ cache.getEvictionManager().runEviction();
+
+ assert watcher.allNodesEvicted();
+
+ try
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ assertNull(cache.get(rootStr + i));
+ }
+ for (int i = 5; i < 10; i++)
+ {
+ assertNotNull(cache.get(rootStr + i));
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Failed to evict" + e);
+ }
+ }
+
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/eviction/FIFOPolicyTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/eviction/KeyEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/KeyEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/KeyEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
/**
* Value object used in queue
Modified: core/branches/flat/src/main/java/org/horizon/eviction/RegionNameConflictException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/RegionNameConflictException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/RegionNameConflictException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
/**
* MarshRegion name conflicts with pre-existing regions.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/RemoveOnEvictActionPolicy.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/RemoveOnEvictActionPolicy.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/RemoveOnEvictActionPolicy.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction;
+package org.horizon.eviction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
/**
- * An eviction action policy that calls {@link org.jboss.cache.Cache_Legacy#removeNode(org.jboss.cache.Fqn)} to evict a node.
+ * An eviction action policy that calls {@link Cache#remove(Object)} to evict an entry.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 3.0
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseEvictionAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/BaseEvictionAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseEvictionAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms;
+package org.horizon.eviction.algorithms;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.*;
-import org.jboss.starobrno.eviction.EvictionEvent.Type;
+import org.horizon.CacheSPI;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.*;
+import org.horizon.eviction.EvictionEvent.Type;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -55,7 +55,7 @@
* This method will create an EvictionQueue implementation and prepare it for use.
*
* @return The created EvictionQueue to be used as the eviction queue for this algorithm.
- * @see org.jboss.starobrno.eviction.EvictionQueue
+ * @see org.horizon.eviction.EvictionQueue
*/
protected abstract EvictionQueue<K> setupEvictionQueue() throws EvictionException;
@@ -114,10 +114,10 @@
* - Empty/Retry the recycle queue of previously evicted but locked (during actual cache eviction) nodes.
*
* @param eventQueue queue containing eviction events
- * @throws org.jboss.starobrno.eviction.EvictionException
+ * @throws org.horizon.eviction.EvictionException
*
*/
- public void process(BlockingQueue<EvictionEvent<K>> eventQueue) throws org.jboss.starobrno.eviction.EvictionException
+ public void process(BlockingQueue<EvictionEvent<K>> eventQueue) throws org.horizon.eviction.EvictionException
{
if (trace) log.trace("process(): cache: " + cache);
initialize();
@@ -135,7 +135,7 @@
* Get the underlying EvictionQueue implementation.
*
* @return the EvictionQueue used by this algorithm
- * @see org.jboss.starobrno.eviction.EvictionQueue
+ * @see org.horizon.eviction.EvictionQueue
*/
public EvictionQueue getEvictionQueue()
{
@@ -163,10 +163,10 @@
* - On VisitEvents, the visited node has its eviction statistics updated (idleTime, numberOfNodeVisists, etc..)
*
* @param queue queue to inspect
- * @throws org.jboss.starobrno.eviction.EvictionException
+ * @throws org.horizon.eviction.EvictionException
* in the event of problems
*/
- protected void processQueues(BlockingQueue<EvictionEvent<K>> queue) throws org.jboss.starobrno.eviction.EvictionException
+ protected void processQueues(BlockingQueue<EvictionEvent<K>> queue) throws org.horizon.eviction.EvictionException
{
EvictionEvent<K> node;
int count = 0;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseSortedEvictionAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/BaseSortedEvictionAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/BaseSortedEvictionAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms;
+package org.horizon.eviction.algorithms;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.eviction.EvictionEvent;
-import org.jboss.starobrno.eviction.EvictionException;
-import org.jboss.starobrno.eviction.algorithms.SortedEvictionQueue;
+import org.horizon.eviction.EvictionEvent;
+import org.horizon.eviction.EvictionException;
+import org.horizon.eviction.algorithms.SortedEvictionQueue;
import java.util.concurrent.BlockingQueue;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ElementSizeAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/ElementSizeAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ElementSizeAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms;
+package org.horizon.eviction.algorithms;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.*;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.*;
/**
* @author Daniel Huang
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ExpirationAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/ExpirationAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/ExpirationAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms;
+package org.horizon.eviction.algorithms;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.*;
-import org.jboss.starobrno.eviction.EvictionEvent.Type;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.*;
+import org.horizon.eviction.EvictionEvent.Type;
import java.util.Iterator;
import java.util.SortedSet;
@@ -40,19 +40,19 @@
* java.lang.System#currentTimeMillis()}).
* <p/>
* This algorithm also obeys the configuration key {@link
- * org.jboss.starobrno.eviction.ExpirationAlgorithmConfig#getMaxNodes()}, and will evict the soonest to
+ * org.horizon.eviction.ExpirationAlgorithmConfig#getMaxNodes()}, and will evict the soonest to
* expire entires first to reduce the region size. If there are not enough
* nodes with expiration keys set, a warning is logged.
* <p/>
* If a node in the eviction region does not have an expiration value, then
- * {@link org.jboss.starobrno.eviction.ExpirationAlgorithmConfig#getTimeToLive()} (if set) will be used.
+ * {@link org.horizon.eviction.ExpirationAlgorithmConfig#getTimeToLive()} (if set) will be used.
* The expiration is updated when a node is added or updated.
* <p/>
* If there is no time-to-live set, and a node in the eviction region does not
* have an expiration value, then that node will never be evicted. As
* forgetting to indicate an expiration value is likely a mistake, a warning
* message is logged by this class. This warning, however, can be disabled
- * through {@link org.jboss.starobrno.eviction.ExpirationAlgorithmConfig#setWarnNoExpirationKey(boolean)}.
+ * through {@link org.horizon.eviction.ExpirationAlgorithmConfig#setWarnNoExpirationKey(boolean)}.
* <p/>
* A node's expiration time can be changed by setting a new value in the node.
* <p/>
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/NULL/NullEvictionAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.NULL;
+package org.horizon.eviction.algorithms.NULL;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.EvictionAction;
-import org.jboss.starobrno.eviction.EvictionAlgorithm;
-import org.jboss.starobrno.eviction.EvictionEvent.Type;
-import org.jboss.starobrno.eviction.EvictionException;
-import org.jboss.starobrno.eviction.EvictionQueue;
+import org.horizon.CacheSPI;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.EvictionAction;
+import org.horizon.eviction.EvictionAlgorithm;
+import org.horizon.eviction.EvictionEvent.Type;
+import org.horizon.eviction.EvictionException;
+import org.horizon.eviction.EvictionQueue;
import java.util.concurrent.BlockingQueue;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/NULL/NullEvictionAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.NULL;
+package org.horizon.eviction.algorithms.NULL;
-import org.jboss.starobrno.config.ConfigurationComponent;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
+import org.horizon.config.ConfigurationComponent;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.EvictionAlgorithmConfig;
/**
* Configuration class for {@link NullEvictionAlgorithm}.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/NULL/NullEvictionQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/NULL/NullEvictionQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.NULL;
+package org.horizon.eviction.algorithms.NULL;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.KeyEntry;
import java.util.Iterator;
import java.util.NoSuchElementException;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/SortedEvictionQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/SortedEvictionQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/SortedEvictionQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms;
+package org.horizon.eviction.algorithms;
-import org.jboss.starobrno.eviction.EvictionQueue;
+import org.horizon.eviction.EvictionQueue;
/**
* Sorted Eviction Queue implementation.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/fifo/FIFOAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.fifo;
+package org.horizon.eviction.algorithms.fifo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.algorithms.BaseEvictionAlgorithm;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.EvictionException;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.algorithms.BaseEvictionAlgorithm;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.EvictionException;
+import org.horizon.eviction.KeyEntry;
/**
* First-in-first-out algorithm used to evict nodes.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/fifo/FIFOAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.fifo;
+package org.horizon.eviction.algorithms.fifo;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase;
+import org.horizon.config.ConfigurationException;
+import org.horizon.eviction.EvictionAlgorithmConfigBase;
/**
* Configuration for {@link FIFOAlgorithm}.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/fifo/FIFOQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/fifo/FIFOQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.fifo;
+package org.horizon.eviction.algorithms.fifo;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.KeyEntry;
import java.util.Iterator;
import java.util.LinkedHashMap;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lfu/LFUAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lfu;
+package org.horizon.eviction.algorithms.lfu;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.algorithms.BaseSortedEvictionAlgorithm;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.KeyEntry;
-import org.jboss.starobrno.eviction.EvictionException;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.algorithms.BaseSortedEvictionAlgorithm;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.KeyEntry;
+import org.horizon.eviction.EvictionException;
/**
* Least Frequently Used algorithm for cache eviction.
@@ -86,7 +86,7 @@
* Will create a LFUQueue to be used as the underlying eviction queue.
*
* @return The created LFUQueue.
- * @throws org.jboss.starobrno.eviction.EvictionException
+ * @throws org.horizon.eviction.EvictionException
*
*/
@Override
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lfu/LFUAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lfu;
+package org.horizon.eviction.algorithms.lfu;
-import org.jboss.starobrno.config.Dynamic;
-import org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase;
+import org.horizon.config.Dynamic;
+import org.horizon.eviction.EvictionAlgorithmConfigBase;
/**
* Configuration implementation for {@link LFUAlgorithm}.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lfu/LFUQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lfu/LFUQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lfu;
+package org.horizon.eviction.algorithms.lfu;
-import org.jboss.starobrno.eviction.KeyEntry;
-import org.jboss.starobrno.eviction.algorithms.SortedEvictionQueue;
+import org.horizon.eviction.KeyEntry;
+import org.horizon.eviction.algorithms.SortedEvictionQueue;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lru/LRUAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lru;
+package org.horizon.eviction.algorithms.lru;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.algorithms.BaseEvictionAlgorithm;
-import org.jboss.starobrno.eviction.KeyEntry;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.EvictionException;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.algorithms.BaseEvictionAlgorithm;
+import org.horizon.eviction.KeyEntry;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.EvictionException;
import java.util.Iterator;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lru/LRUAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lru;
+package org.horizon.eviction.algorithms.lru;
-import org.jboss.cache.annotations.Compat;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.Dynamic;
-import org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.Dynamic;
+import org.horizon.eviction.EvictionAlgorithmConfigBase;
import java.util.concurrent.TimeUnit;
@@ -100,13 +99,6 @@
this.timeToLive = timeUnit.toMillis(timeToLive);
}
- @Deprecated
- @Compat
- public void setTimeToLiveSeconds(long time)
- {
- setTimeToLive(time, TimeUnit.SECONDS);
- }
-
/**
* @return the max age per element, in milliseconds
*/
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/lru/LRUQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/lru/LRUQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.lru;
+package org.horizon.eviction.algorithms.lru;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.KeyEntry;
import java.util.Iterator;
import java.util.LinkedHashMap;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionListEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/mru/EvictionListEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionListEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.mru;
+package org.horizon.eviction.algorithms.mru;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.KeyEntry;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionQueueList.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/mru/EvictionQueueList.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/EvictionQueueList.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.mru;
+package org.horizon.eviction.algorithms.mru;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.KeyEntry;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithm.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/mru/MRUAlgorithm.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithm.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.mru;
+package org.horizon.eviction.algorithms.mru;
-import org.jboss.starobrno.config.EvictionAlgorithmConfig;
-import org.jboss.starobrno.eviction.algorithms.BaseEvictionAlgorithm;
-import org.jboss.starobrno.eviction.KeyEntry;
-import org.jboss.starobrno.eviction.EvictionException;
-import org.jboss.starobrno.eviction.EvictionEvent;
-import org.jboss.starobrno.eviction.EvictionQueue;
+import org.horizon.config.EvictionAlgorithmConfig;
+import org.horizon.eviction.algorithms.BaseEvictionAlgorithm;
+import org.horizon.eviction.KeyEntry;
+import org.horizon.eviction.EvictionException;
+import org.horizon.eviction.EvictionEvent;
+import org.horizon.eviction.EvictionQueue;
/**
* Most Recently Used Algorithm.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithmConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/mru/MRUAlgorithmConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUAlgorithmConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.mru;
+package org.horizon.eviction.algorithms.mru;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.eviction.EvictionAlgorithmConfigBase;
+import org.horizon.config.ConfigurationException;
+import org.horizon.eviction.EvictionAlgorithmConfigBase;
/**
* Configuration for {@link MRUAlgorithm}.
Modified: core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUQueue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/eviction/algorithms/mru/MRUQueue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/eviction/algorithms/mru/MRUQueue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.eviction.algorithms.mru;
+package org.horizon.eviction.algorithms.mru;
-import org.jboss.starobrno.eviction.EvictionQueue;
-import org.jboss.starobrno.eviction.KeyEntry;
+import org.horizon.eviction.EvictionQueue;
+import org.horizon.eviction.KeyEntry;
import java.util.HashMap;
import java.util.Iterator;
Copied: core/branches/flat/src/main/java/org/horizon/executors (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/executors)
Modified: core/branches/flat/src/main/java/org/horizon/executors/DefaultExecutorFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/executors/DefaultExecutorFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/executors/DefaultExecutorFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.executors;
+package org.horizon.executors;
-import org.jboss.starobrno.util.TypedProperties;
+import org.horizon.util.TypedProperties;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
Modified: core/branches/flat/src/main/java/org/horizon/executors/DefaultScheduledExecutorFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/executors/DefaultScheduledExecutorFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/executors/DefaultScheduledExecutorFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.executors;
+package org.horizon.executors;
-import org.jboss.starobrno.util.TypedProperties;
+import org.horizon.util.TypedProperties;
import java.util.Properties;
import java.util.concurrent.Executors;
Modified: core/branches/flat/src/main/java/org/horizon/executors/ExecutorFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/executors/ExecutorFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/executors/ExecutorFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.executors;
+package org.horizon.executors;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
Modified: core/branches/flat/src/main/java/org/horizon/executors/ScheduledExecutorFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/executors/ScheduledExecutorFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/executors/ScheduledExecutorFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.executors;
+package org.horizon.executors;
import java.util.Properties;
import java.util.concurrent.ScheduledExecutorService;
Copied: core/branches/flat/src/main/java/org/horizon/factories (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/factories)
Modified: core/branches/flat/src/main/java/org/horizon/factories/AbstractComponentRegistry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/AbstractComponentRegistry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/AbstractComponentRegistry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,27 +19,27 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Version;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.RuntimeConfig;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.factories.annotations.Destroy;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-import org.jboss.starobrno.lifecycle.Lifecycle;
-import org.jboss.starobrno.util.BeanUtils;
-import org.jboss.starobrno.util.ReflectionUtil;
+import org.horizon.CacheStatus;
+import org.horizon.Version;
+import org.horizon.CacheException;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.RuntimeConfig;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.factories.annotations.Destroy;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+import org.horizon.lifecycle.Lifecycle;
+import org.horizon.util.BeanUtils;
+import org.horizon.util.ReflectionUtil;
import javax.management.MBeanServerFactory;
import java.lang.reflect.Method;
@@ -68,13 +68,11 @@
* <ul>
* <li>INSTANTIATED - when first constructed</li>
* <li>CONSTRUCTED - when created using the DefaultCacheFactory</li>
- * <li>When {@link org.jboss.cache.Cache_Legacy#create()} is called, the components are rewired.</li>
- * <li>STARTED - when {@link org.jboss.cache.Cache_Legacy#start()} is called</li>
- * <li>STOPPED - when {@link org.jboss.cache.Cache_Legacy#stop()} is called</li>
- * <li>DESTROYED - when {@link org.jboss.cache.Cache_Legacy#destroy()} is called.</li>
+ * <li>STARTED - when {@link org.horizon.Cache#start()} is called</li>
+ * <li>STOPPED - when {@link org.horizon.Cache#stop()} is called</li>
* </ul>
* <p/>
- * Cache configuration can only be changed and will only be reinjected if the cache is not in the {@link org.jboss.cache.CacheStatus#STARTED} state.
+ * Cache configuration can only be changed and will only be reinjected if the cache is not in the {@link org.horizon.CacheStatus#STARTED} state.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 2.1.0
@@ -118,7 +116,7 @@
}
/**
- * Wires an object instance with dependencies annotated with the {@link org.jboss.cache.factories.annotations.Inject} annotation, creating more components
+ * Wires an object instance with dependencies annotated with the {@link Inject} annotation, creating more components
* as needed based on the Configuration passed in if these additional components don't exist in the
* {@link ComponentRegistry}. Strictly for components that don't otherwise live in the registry and have a lifecycle, such as Nodes.
*
@@ -143,7 +141,7 @@
}
/**
- * This is hard coded for now, since scanning the classpath for factories annotated with {@link org.jboss.cache.factories.annotations.DefaultFactoryFor}
+ * This is hard coded for now, since scanning the classpath for factories annotated with {@link DefaultFactoryFor}
* does not work with all class loaders. This is a temporary solution until a more elegant one can be designed.
* <p/>
* BE SURE TO ADD ANY NEW FACTORY TYPES ANNOTATED WITH DefaultFactoryFor TO THIS SET!!
@@ -155,7 +153,6 @@
{
Set<Class<? extends ComponentFactory>> s = new HashSet<Class<? extends ComponentFactory>>();
s.add(BootstrapFactory.class);
- s.add(BuddyManagerFactory.class);
s.add(EmptyConstructorFactory.class);
s.add(InterceptorChainFactory.class);
s.add(RuntimeConfigAwareFactory.class);
@@ -163,7 +160,6 @@
s.add(ReplicationQueueFactory.class);
s.add(StateTransferManagerFactory.class);
s.add(StateTransferFactory.class);
- s.add(NullComponentFactory.class);
s.add(LockManagerFactory.class);
s.add(DataContainerFactory.class);
s.add(EvictionManagerFactory.class);
@@ -255,7 +251,7 @@
* Summing it up, component retrieval happens in the following order:<br />
* 1. Look for a component that has already been created and registered.
* 2. Look for an appropriate component that exists in the {@link Configuration} that may be injected from an external system.
- * 3. Look for a class definition passed in to the {@link org.jboss.cache.config.Configuration} - such as an EvictionPolicy implementation
+ * 3. Look for a class definition passed in to the {@link Configuration} - such as an EvictionPolicy implementation
* 4. Attempt to create it by looking for an appropriate factory (annotated with {@link DefaultFactoryFor})
* <p/>
*
@@ -336,7 +332,7 @@
}
/**
- * Scans the class path for classes annotated with {@link org.jboss.cache.factories.annotations.DefaultFactoryFor}, and
+ * Scans the class path for classes annotated with {@link DefaultFactoryFor}, and
* analyses which components can be created by such factories.
*/
void scanDefaultFactories()
@@ -536,7 +532,7 @@
// These methods perform a check for appropriate transition and then delegate to similarly named internal methods.
/**
- * Creates the components needed by a cache instance and sets the cache status to {@link org.jboss.cache.CacheStatus#CREATED}
+ * Creates the components needed by a cache instance and sets the cache status to {@link org.horizon.CacheStatus#CREATED}
* when it is done.
*/
public void create()
@@ -561,7 +557,7 @@
/**
* This starts the components in the cache, connecting to channels, starting service threads, etc. If the cache is
- * not in the {@link org.jboss.cache.CacheStatus#CREATED} state, {@link #create()} will be invoked first.
+ * not in the {@link org.horizon.CacheStatus#CREATED} state, {@link #create()} will be invoked first.
*/
public void start()
{
@@ -591,8 +587,8 @@
}
/**
- * Stops the cache and sets the cache status to {@link org.jboss.cache.CacheStatus#STOPPED} once it is done. If the cache is not in
- * the {@link org.jboss.cache.CacheStatus#STARTED} state, this is a no-op.
+ * Stops the cache and sets the cache status to {@link org.horizon.CacheStatus#STOPPED} once it is done. If the cache is not in
+ * the {@link org.horizon.CacheStatus#STARTED} state, this is a no-op.
*/
public void stop()
{
@@ -626,7 +622,7 @@
/**
* Destroys the cache and frees up any resources. Sets the cache status to {@link CacheStatus#DESTROYED} when it is done.
* <p/>
- * If the cache is in {@link org.jboss.cache.CacheStatus#STARTED} when this method is called, it will first call {@link #stop()}
+ * If the cache is in {@link org.horizon.CacheStatus#STARTED} when this method is called, it will first call {@link #stop()}
* to stop the cache.
*/
public void destroy()
@@ -807,11 +803,11 @@
/**
* Asserts whether invocations are allowed on the cache or not. Returns <tt>true</tt> if invocations are to be allowed,
- * <tt>false</tt> otherwise. If the origin of the call is remote and the cache status is {@link org.jboss.cache.CacheStatus#STARTING},
- * this method will block for up to {@link org.jboss.cache.config.Configuration#getStateRetrievalTimeout()} millis, checking
+ * <tt>false</tt> otherwise. If the origin of the call is remote and the cache status is {@link org.horizon.CacheStatus#STARTING},
+ * this method will block for up to {@link Configuration#getStateRetrievalTimeout()} millis, checking
* for a valid state.
*
- * @param originLocal true if the call originates locally (i.e., from the {@link org.jboss.cache.invocation.CacheInvocationDelegate} or false if it originates remotely, i.e., from the {@link org.jboss.cache.marshall.CommandAwareRpcDispatcher}.
+ * @param originLocal true if the call originates locally (i.e., from the {@link org.horizon.CacheDelegate} or false if it originates remotely, i.e., from the {@link org.horizon.marshall.CommandAwareRpcDispatcher}.
* @return true if invocations are allowed, false otherwise.
*/
public boolean invocationsAllowed(boolean originLocal)
@@ -846,8 +842,8 @@
}
/**
- * Blocks until the current cache instance is in its {@link org.jboss.cache.CacheStatus#STARTED started} phase. Blocks
- * for up to {@link org.jboss.cache.config.Configuration#getStateRetrievalTimeout()} milliseconds, throwing an IllegalStateException
+ * Blocks until the current cache instance is in its {@link org.horizon.CacheStatus#STARTED started} phase. Blocks
+ * for up to {@link Configuration#getStateRetrievalTimeout()} milliseconds, throwing an IllegalStateException
* if the cache doesn't reach this state even after this maximum wait time.
*
* @throws InterruptedException if interrupted while waiting
Modified: core/branches/flat/src/main/java/org/horizon/factories/BootstrapFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/BootstrapFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/BootstrapFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.factories.annotations.NonVolatile;
/**
* Factory for setting up bootstrap components
Deleted: core/branches/flat/src/main/java/org/horizon/factories/BuddyManagerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/BuddyManagerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/BuddyManagerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.factories;
-
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-
-/**
- * Buddy manager factory
- *
- * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @since 2.1.0
- */
- at DefaultFactoryFor(classes = {BuddyManager.class})
-public class BuddyManagerFactory extends EmptyConstructorFactory
-{
- @Override
- public <T> T construct(Class<T> componentType)
- {
- if (configuration.getBuddyReplicationConfig() != null && configuration.getBuddyReplicationConfig().isEnabled() && configuration.getCacheMode() != Configuration.CacheMode.LOCAL)
- {
- return super.construct(componentType);
- }
- else
- {
- return null;
- }
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/factories/ComponentFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/ComponentFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/ComponentFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
/**
* Factory that creates components used internally within JBoss Cache, and also wires dependencies into the components.
Modified: core/branches/flat/src/main/java/org/horizon/factories/ComponentRegistry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/ComponentRegistry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/ComponentRegistry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,10 +1,10 @@
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.scopes.ScopeDetector;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.factories.scopes.ScopeDetector;
+import org.horizon.factories.scopes.Scopes;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/factories/DataContainerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/DataContainerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/DataContainerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.container.UnsortedDataContainer;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
+import org.horizon.container.DataContainer;
+import org.horizon.container.UnsortedDataContainer;
+import org.horizon.factories.annotations.DefaultFactoryFor;
/**
* // TODO: MANIK: Document this
Modified: core/branches/flat/src/main/java/org/horizon/factories/DefaultCacheFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/DefaultCacheFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/DefaultCacheFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,25 +19,25 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.cache.jmx.PlatformMBeanServerRegistration;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheDelegate;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.manager.CacheManager;
+import org.horizon.jmx.PlatformMBeanServerRegistration;
+import org.horizon.Cache;
+import org.horizon.CacheDelegate;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.manager.CacheManager;
/**
- * Default implementation of the {@link org.jboss.cache.CacheFactory} interface.
+ * Default implementation of the {@link CacheFactory} interface.
* <p/>
* This is a special instance of a {@link ComponentFactory} which contains bootstrap information for the
- * {@link org.jboss.cache.factories.ComponentRegistry}.
+ * {@link ComponentRegistry}.
* <p/>
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
- * @see org.jboss.cache.factories.ComponentFactory
+ * @see ComponentFactory
*/
public class DefaultCacheFactory<K, V> extends ComponentFactory// implements CacheFactory<K, V>
{
Modified: core/branches/flat/src/main/java/org/horizon/factories/EmptyConstructorFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/EmptyConstructorFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/EmptyConstructorFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,27 +19,23 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.cache.RegionRegistry;
-import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
-import org.jboss.cache.invocation.CacheInvocationDelegate;
-import org.jboss.cache.lock.LockStrategyFactory;
-import org.jboss.starobrno.batch.BatchContainer;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.factories.context.ContextFactory;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.loader.CacheLoaderManager;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.marshall.VersionAwareMarshaller;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.remoting.ChannelMessageListener;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.remoting.RPCManagerImpl;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.batch.BatchContainer;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.config.ConfigurationException;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.factories.context.ContextFactory;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.marshall.Marshaller;
+import org.horizon.marshall.VersionAwareMarshaller;
+import org.horizon.notifications.Notifier;
+import org.horizon.remoting.ChannelMessageListener;
+import org.horizon.remoting.RPCManager;
+import org.horizon.remoting.RPCManagerImpl;
+import org.horizon.transaction.TransactionTable;
/**
* Simple factory that just uses reflection and an empty constructor of the component type.
@@ -47,11 +43,9 @@
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 2.1.0
*/
- at DefaultFactoryFor(classes = {Notifier.class, RegionRegistry.class,
- ChannelMessageListener.class, CacheLoaderManager.class, ExtendedMarshaller.class, InvocationContextContainer.class,
- CacheInvocationDelegate.class, TransactionTable.class,
- LockStrategyFactory.class, BuddyFqnTransformer.class, BatchContainer.class,
- ContextFactory.class, EntryFactory.class, CommandsFactory.class})
+ at DefaultFactoryFor(classes = {Notifier.class,
+ ChannelMessageListener.class, CacheLoaderManager.class, Marshaller.class, InvocationContextContainer.class,
+ TransactionTable.class, BatchContainer.class, ContextFactory.class, EntryFactory.class, CommandsFactory.class})
public class EmptyConstructorFactory extends ComponentFactory
{
@Override
@@ -62,7 +56,7 @@
if (componentType.isInterface())
{
Class componentImpl;
- if (componentType.equals(ExtendedMarshaller.class))
+ if (componentType.equals(Marshaller.class))
{
componentImpl = VersionAwareMarshaller.class;
}
Modified: core/branches/flat/src/main/java/org/horizon/factories/EntryFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/EntryFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/EntryFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.lock.TimeoutException;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.lock.TimeoutException;
/**
* // TODO: MANIK: Document this
@@ -42,7 +42,7 @@
* @param key Key to lock
* @return true if a lock was needed and acquired, false if it didn't need to acquire the lock (i.e., lock was already held)
* @throws InterruptedException if interrupted
- * @throws org.jboss.starobrno.lock.TimeoutException
+ * @throws org.horizon.lock.TimeoutException
* if we are unable to acquire the lock after a specified timeout.
*/
boolean acquireLock(InvocationContext ctx, Object key) throws InterruptedException, TimeoutException;
Modified: core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/EntryFactoryImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/EntryFactoryImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,23 +19,23 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.container.NullMarkerEntry;
-import org.jboss.starobrno.container.ReadCommittedEntry;
-import org.jboss.starobrno.container.RepeatableReadEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.lock.TimeoutException;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.config.Configuration;
+import org.horizon.container.DataContainer;
+import org.horizon.container.MVCCEntry;
+import org.horizon.container.NullMarkerEntry;
+import org.horizon.container.ReadCommittedEntry;
+import org.horizon.container.RepeatableReadEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.lock.LockManager;
+import org.horizon.lock.TimeoutException;
+import org.horizon.notifications.Notifier;
/**
* // TODO: MANIK: Document this
@@ -177,7 +177,7 @@
* @param key Key to lock
* @return true if a lock was needed and acquired, false if it didn't need to acquire the lock (i.e., lock was already held)
* @throws InterruptedException if interrupted
- * @throws org.jboss.starobrno.lock.TimeoutException
+ * @throws org.horizon.lock.TimeoutException
* if we are unable to acquire the lock after a specified timeout.
*/
public boolean acquireLock(InvocationContext ctx, Object key) throws InterruptedException, TimeoutException
Modified: core/branches/flat/src/main/java/org/horizon/factories/EvictionManagerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/EvictionManagerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/EvictionManagerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,8 +1,8 @@
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.EvictionManager;
-import org.jboss.starobrno.eviction.EvictionManagerImpl;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
+import org.horizon.EvictionManager;
+import org.horizon.eviction.EvictionManagerImpl;
+import org.horizon.factories.annotations.DefaultFactoryFor;
/**
* @author Mircea.Markus at jboss.com
Modified: core/branches/flat/src/main/java/org/horizon/factories/GlobalComponentRegistry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/GlobalComponentRegistry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/GlobalComponentRegistry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,7 +1,7 @@
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.GlobalConfiguration;
+import org.horizon.CacheException;
+import org.horizon.config.GlobalConfiguration;
/**
* // TODO: Manik: Document this!
Modified: core/branches/flat/src/main/java/org/horizon/factories/InterceptorChainFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/InterceptorChainFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/InterceptorChainFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,20 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.CustomInterceptorConfig;
-import org.jboss.starobrno.config.EvictionCacheConfig;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.interceptors.*;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.eviction.EvictionCacheManager;
-import org.jboss.starobrno.eviction.EvictionCacheManagerImpl;
-import org.jboss.starobrno.EvictionManager;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.CustomInterceptorConfig;
+import org.horizon.config.EvictionCacheConfig;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.interceptors.*;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.eviction.EvictionCacheManager;
+import org.horizon.eviction.EvictionCacheManagerImpl;
+import org.horizon.CacheSPI;
+import org.horizon.EvictionManager;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/factories/LockManagerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/LockManagerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/LockManagerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.lock.StripedLockManager;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.lock.LockManager;
+import org.horizon.lock.StripedLockManager;
/**
* // TODO: MANIK: Document this
Deleted: core/branches/flat/src/main/java/org/horizon/factories/NullComponentFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/NullComponentFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/NullComponentFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.factories;
-
-import org.jboss.cache.RegionManager;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-
-/**
- * // TODO: MANIK: Document this
- *
- * @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @since 3.0
- */
- at DefaultFactoryFor(classes = RegionManager.class)
-public class NullComponentFactory extends ComponentFactory
-{
- protected <T> T construct(Class<T> componentType)
- {
- return null;
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/factories/ReplicationQueueFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/ReplicationQueueFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/ReplicationQueueFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.cluster.ReplicationQueue;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
+import org.horizon.cluster.ReplicationQueue;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.DefaultFactoryFor;
/**
* RPCManager factory
Modified: core/branches/flat/src/main/java/org/horizon/factories/RuntimeConfigAwareFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/RuntimeConfigAwareFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/RuntimeConfigAwareFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.RuntimeConfig;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.util.BeanUtils;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.RuntimeConfig;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.remoting.RPCManager;
+import org.horizon.util.BeanUtils;
import java.lang.reflect.Method;
Modified: core/branches/flat/src/main/java/org/horizon/factories/StateTransferFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/StateTransferFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/StateTransferFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.cache.statetransfer.DefaultStateTransferGenerator;
-import org.jboss.cache.statetransfer.DefaultStateTransferIntegrator;
-import org.jboss.cache.statetransfer.StateTransferGenerator;
-import org.jboss.cache.statetransfer.StateTransferIntegrator;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-
/**
- * Factory class able to create {@link org.jboss.cache.statetransfer.StateTransferGenerator} and
- * {@link org.jboss.cache.statetransfer.StateTransferIntegrator} instances.
+ * Factory class able to create {@link StateTransferGenerator} and
+ * {@link StateTransferIntegrator} instances.
* <p/>
* Updated in 3.0.0 to extend ComponentFactory, etc.
* <p/>
@@ -38,19 +32,21 @@
* @author Manik Surtani
* @version $Revision$
*/
- at DefaultFactoryFor(classes = {StateTransferGenerator.class, StateTransferIntegrator.class})
+// TODO: Implement me
+//@DefaultFactoryFor(classes = {StateTransferGenerator.class, StateTransferIntegrator.class})
public class StateTransferFactory extends ComponentFactory
{
@SuppressWarnings("deprecation")
protected <T> T construct(Class<T> componentType)
{
- if (componentType.equals(StateTransferIntegrator.class))
- {
- return componentType.cast(new DefaultStateTransferIntegrator());
- }
- else
- {
- return componentType.cast(new DefaultStateTransferGenerator());
- }
+ return null;
+// if (componentType.equals(StateTransferIntegrator.class))
+// {
+// return componentType.cast(new DefaultStateTransferIntegrator());
+// }
+// else
+// {
+// return componentType.cast(new DefaultStateTransferGenerator());
+// }
}
}
Modified: core/branches/flat/src/main/java/org/horizon/factories/StateTransferManagerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/StateTransferManagerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/StateTransferManagerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.statetransfer.DefaultStateTransferManager;
-import org.jboss.starobrno.statetransfer.StateTransferManager;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
+import org.horizon.statetransfer.DefaultStateTransferManager;
+import org.horizon.statetransfer.StateTransferManager;
+import org.horizon.factories.annotations.DefaultFactoryFor;
/**
- * Constructs {@link org.jboss.starobrno.statetransfer.StateTransferManager} instances.
+ * Constructs {@link org.horizon.statetransfer.StateTransferManager} instances.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 3.0
Modified: core/branches/flat/src/main/java/org/horizon/factories/TransactionManagerFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/TransactionManagerFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/TransactionManagerFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories;
+package org.horizon.factories;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.factories.annotations.DefaultFactoryFor;
-import org.jboss.starobrno.transaction.BatchModeTransactionManager;
-import org.jboss.starobrno.transaction.TransactionManagerLookup;
+import org.horizon.config.ConfigurationException;
+import org.horizon.factories.annotations.DefaultFactoryFor;
+import org.horizon.transaction.BatchModeTransactionManager;
+import org.horizon.transaction.TransactionManagerLookup;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/DefaultFactoryFor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/DefaultFactoryFor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/DefaultFactoryFor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/Destroy.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/Destroy.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/Destroy.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/Inject.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/Inject.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/Inject.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -28,8 +28,8 @@
/**
* Used to annotate a method as one that is used to inject a registered component into another component. The component
- * to be constructed must be built using the {@link org.jboss.cache.factories.ComponentFactory#construct(Class)} method, or if your object that needs
- * components injected into it already exists, it can be built using the {@link org.jboss.cache.factories.ComponentRegistry#wireDependencies(Object)}
+ * to be constructed must be built using the {@link ComponentFactory#construct(Class)} method, or if your object that needs
+ * components injected into it already exists, it can be built using the {@link ComponentRegistry#wireDependencies(Object)}
* method.
* <p/>
* Usage example:
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/NonVolatile.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/NonVolatile.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/NonVolatile.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -27,9 +27,9 @@
import java.lang.annotation.Target;
/**
- * This annotation is used for components that will be registered in the {@link org.jboss.cache.factories.ComponentRegistry},
- * that are resilient to changes in configuration. Examples are the {@link org.jboss.cache.CacheSPI} implementation used, which does
- * not change regardless of the configuration. Components such as the {@link org.jboss.cache.lock.LockManager}, though, should
+ * This annotation is used for components that will be registered in the {@link org.horizon.factories.ComponentRegistry},
+ * that are resilient to changes in configuration. Examples are the {@link org.horizon.CacheSPI} implementation used, which does
+ * not change regardless of the configuration. Components such as the {@link org.horizon.lock.LockManager}, though, should
* <b>never</b> be marked as <tt>@NonVolatile</tt> since based on the configuration, different lock manager implementations
* may be selected. LockManager is, hence, <b>not</b> resilient to changes in the configuration.
*
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/Start.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/Start.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/Start.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/factories/annotations/Stop.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/annotations/Stop.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/annotations/Stop.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.annotations;
+package org.horizon.factories.annotations;
import static java.lang.annotation.ElementType.METHOD;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/factories/context/ContextFactory.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/context/ContextFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/context/ContextFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.factories.context;
+package org.horizon.factories.context;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.InvocationContextImpl;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.context.TransactionContextImpl;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.InvocationContextImpl;
+import org.horizon.context.TransactionContext;
+import org.horizon.context.TransactionContextImpl;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
/**
- * This is the factory responsible for creating {@link org.jboss.cache.InvocationContext}s and {@link org.jboss.cache.transaction.TransactionContext}s
+ * This is the factory responsible for creating {@link InvocationContext}s and {@link TransactionContext}s
* for requests, based on the configuration used.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
Modified: core/branches/flat/src/main/java/org/horizon/factories/scopes/Scope.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/scopes/Scope.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/scopes/Scope.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.factories.scopes;
+package org.horizon.factories.scopes;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Modified: core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetector.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/scopes/ScopeDetector.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetector.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.factories.scopes;
+package org.horizon.factories.scopes;
-import org.jboss.starobrno.util.ReflectionUtil;
+import org.horizon.util.ReflectionUtil;
/**
* Retrieves the declated scope of a component
Copied: core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetectorTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/factories/scopes/ScopeDetectorTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetectorTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/factories/scopes/ScopeDetectorTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,90 @@
+package org.horizon.factories.scopes;
+
+import org.testng.annotations.Test;
+
+/**
+ * @author Manik Surtani
+ */
+ at Test(groups = "unit")
+public class ScopeDetectorTest
+{
+ public void testScopeOnClass()
+ {
+ testScopes(Test1.class, Scopes.GLOBAL);
+
+ }
+
+ public void testScopeOnInterface()
+ {
+ testScopes(Test2.class, Scopes.GLOBAL);
+ }
+
+ public void testScopeOnSuperClass()
+ {
+ testScopes(Test3.class, Scopes.GLOBAL);
+ }
+
+ public void testScopeOnSuperInterface()
+ {
+ testScopes(Test4.class, Scopes.GLOBAL);
+ }
+
+ public void testNoScopes()
+ {
+ testScopes(Test6.class, Scopes.NAMED_CACHE);
+ }
+
+ private void testScopes(Class clazz, Scopes expected)
+ {
+ Scopes detected = ScopeDetector.detectScope(clazz);
+ assert detected == expected : "Expected " + expected + " but was " + detected;
+ }
+
+ public static interface Unscoped
+ {
+
+ }
+
+ @Scope(Scopes.GLOBAL)
+ public static interface Scoped
+ {
+
+ }
+
+ @Scope(Scopes.GLOBAL)
+ public static class SuperScoped
+ {
+
+ }
+
+ public static class SuperUnScoped
+ {
+
+ }
+
+ @Scope(Scopes.GLOBAL)
+ public static class Test1
+ {
+
+ }
+
+ public static class Test2 implements Scoped
+ {
+
+ }
+
+ public static class Test3 extends SuperScoped
+ {
+
+ }
+
+ public static class Test4 extends Test2
+ {
+
+ }
+
+ public static class Test6 extends SuperUnScoped implements Unscoped
+ {
+
+ }
+}
Modified: core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/factories/scopes/Scopes.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/factories/scopes/Scopes.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.factories.scopes;
+package org.horizon.factories.scopes;
/**
* The different scopes that can be declared for a component in the cache system. If components are not bounded to a
@@ -10,14 +10,14 @@
public enum Scopes
{
/**
- * Components bounded to this scope can only be created by a {@link org.jboss.starobrno.manager.CacheManager} and exist in the
- * {@link org.jboss.starobrno.manager.CacheManager}'s {@link org.jboss.starobrno.factories.ComponentRegistry}.
+ * Components bounded to this scope can only be created by a {@link org.horizon.manager.CacheManager} and exist in the
+ * {@link org.horizon.manager.CacheManager}'s {@link org.horizon.factories.ComponentRegistry}.
*/
GLOBAL,
/**
- * Components bounded to this scope can only be created by a {@link org.jboss.starobrno.Cache} and exist in the
- * {@link org.jboss.starobrno.Cache}'s {@link org.jboss.starobrno.factories.ComponentRegistry}.
+ * Components bounded to this scope can only be created by a {@link org.horizon.Cache} and exist in the
+ * {@link org.horizon.Cache}'s {@link org.horizon.factories.ComponentRegistry}.
*/
NAMED_CACHE;
Copied: core/branches/flat/src/main/java/org/horizon/interceptors (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/interceptors)
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/BaseTransactionalContextInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/BaseTransactionalContextInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/BaseTransactionalContextInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
import javax.transaction.Status;
import javax.transaction.SystemException;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/BatchingInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/BatchingInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/BatchingInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.batch.BatchContainer;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
+import org.horizon.batch.BatchContainer;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.interceptors.base.CommandInterceptor;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CacheLoaderInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/CacheLoaderInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,25 +19,25 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.commands.write.ReplaceCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.EntryFactory;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.interceptors.base.JmxStatsCommandInterceptor;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
-import org.jboss.starobrno.jmx.annotations.ManagedOperation;
-import org.jboss.starobrno.loader.CacheLoader;
-import org.jboss.starobrno.loader.CacheLoaderManager;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.container.DataContainer;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.EntryFactory;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.interceptors.base.JmxStatsCommandInterceptor;
+import org.horizon.annotations.ManagedAttribute;
+import org.horizon.annotations.ManagedOperation;
+import org.horizon.loader.CacheLoader;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.notifications.Notifier;
+import org.horizon.transaction.TransactionTable;
import java.util.HashMap;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/CacheMgmtInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CacheMgmtInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/CacheMgmtInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.write.EvictCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.interceptors.base.JmxStatsCommandInterceptor;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
-import org.jboss.starobrno.jmx.annotations.ManagedOperation;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.container.DataContainer;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.interceptors.base.JmxStatsCommandInterceptor;
+import org.horizon.annotations.ManagedAttribute;
+import org.horizon.annotations.ManagedOperation;
import java.util.HashMap;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/CacheStoreInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CacheStoreInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/CacheStoreInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
import java.util.ArrayList;
import java.util.HashMap;
@@ -33,28 +33,28 @@
import javax.transaction.TransactionManager;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.jmx.annotations.ManagedAttribute;
-import org.jboss.cache.jmx.annotations.ManagedOperation;
-import org.jboss.starobrno.commands.AbstractVisitor;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.interceptors.base.JmxStatsCommandInterceptor;
-import org.jboss.starobrno.loader.CacheLoader;
-import org.jboss.starobrno.loader.CacheLoaderManager;
-import org.jboss.starobrno.loader.Modification;
-import org.jboss.starobrno.loader.Modification.ModificationType;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.jmx.annotations.ManagedAttribute;
+import org.horizon.jmx.annotations.ManagedOperation;
+import org.horizon.commands.AbstractVisitor;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.interceptors.base.JmxStatsCommandInterceptor;
+import org.horizon.loader.CacheLoader;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.loader.Modification;
+import org.horizon.loader.Modification.ModificationType;
+import org.horizon.transaction.GlobalTransaction;
/**
* Writes modifications back to the store on the way out: stores modifications back
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/CallInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/CallInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/CallInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,21 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.transaction.GlobalTransaction;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/EvictionInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/EvictionInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/EvictionInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.eviction.EvictionCacheManager;
-import org.jboss.starobrno.eviction.EvictionEvent;
-import static org.jboss.starobrno.eviction.EvictionEvent.Type.*;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.write.*;
+import org.horizon.context.InvocationContext;
+import org.horizon.eviction.EvictionCacheManager;
+import org.horizon.eviction.EvictionEvent;
+import static org.horizon.eviction.EvictionEvent.Type.*;
+import org.horizon.interceptors.base.CommandInterceptor;
/**
* Eviction Interceptor.
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/InterceptorChain.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/InterceptorChain.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
+import org.horizon.CacheException;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.invocation.InvocationContextContainer;
import java.util.ArrayList;
import java.util.Collections;
@@ -281,8 +281,8 @@
}
/**
- * Similar to {@link #invoke(org.jboss.cache.starbrnoInvocationContext , org.jboss.cache.starbrnocommands.VisitableCommand)}, but
- * constructs a invocation context on the fly, using {@link org.jboss.cache.starbrnoinvocation.InvocationContextContainer#get()}
+ * Similar to {@link #invoke(InvocationContext , VisitableCommand)}, but
+ * constructs a invocation context on the fly, using {@link InvocationContextContainer#get()}
*/
public Object invokeRemote(VisitableCommand cacheCommand) throws Throwable
{
@@ -292,8 +292,9 @@
}
/**
- * Similar to {@link #invoke(org.jboss.cache.starbrnoInvocationContext , org.jboss.cache.starbrnocommands.VisitableCommand)}, but
- * constructs a invocation context on the fly, using {@link org.jboss.cache.starbrnoinvocation.InvocationContextContainer#get()} and setting the origin local flag to its default value.
+ * Similar to {@link #invoke(InvocationContext , VisitableCommand)}, but
+ * constructs a invocation context on the fly, using {@link InvocationContextContainer#get()} and setting the origin
+ * local flag to its default value.
*/
public Object invoke(VisitableCommand cacheCommand) throws Throwable
{
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/InvalidationInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/InvalidationInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,27 +19,27 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.AbstractVisitor;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.DataCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.InvalidateCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.interceptors.base.BaseRpcInterceptor;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
-import org.jboss.starobrno.jmx.annotations.ManagedOperation;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.commands.AbstractVisitor;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.DataCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.InvalidateCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.config.Option;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.interceptors.base.BaseRpcInterceptor;
+import org.horizon.annotations.ManagedAttribute;
+import org.horizon.annotations.ManagedOperation;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/InvocationContextInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/InvocationContextInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/InvocationContextInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,21 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.*;
+import org.horizon.config.Option;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.remoting.RPCManager;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/LockingInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/LockingInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/LockingInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,29 +19,29 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.GravitateDataCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.EvictCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.commands.write.ReplaceCommand;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.container.MVCCEntry;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.EntryFactory;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.lock.LockManager;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.GravitateDataCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.container.DataContainer;
+import org.horizon.container.MVCCEntry;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.EntryFactory;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.lock.LockManager;
import java.util.ArrayList;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/MarshalledValueInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/MarshalledValueInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.marshall.MarshalledValue;
-import org.jboss.starobrno.marshall.MarshalledValueHelper;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.marshall.MarshalledValue;
+import org.horizon.marshall.MarshalledValueHelper;
//import org.jboss.starobrno.marshall.MarshalledValueHelper;
import java.io.IOException;
@@ -40,14 +40,14 @@
import java.util.Set;
/**
- * Interceptor that handles the wrapping and unwrapping of cached data using {@link org.jboss.starobrno.marshall.MarshalledValue}s.
+ * Interceptor that handles the wrapping and unwrapping of cached data using {@link org.horizon.marshall.MarshalledValue}s.
* Known "excluded" types are not wrapped/unwrapped, which at this time include {@link String}, Java primitives
* and their Object wrappers, as well as arrays of excluded types.
* <p/>
- * The {@link org.jboss.starobrno.marshall.MarshalledValue} wrapper handles lazy deserialization from byte array representations.
+ * The {@link org.horizon.marshall.MarshalledValue} wrapper handles lazy deserialization from byte array representations.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @see org.jboss.starobrno.marshall.MarshalledValue
+ * @see org.horizon.marshall.MarshalledValue
* @since 2.1.0
*/
public class MarshalledValueInterceptor extends CommandInterceptor
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/NotificationInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/NotificationInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.notifications.Notifier;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.notifications.Notifier;
/**
* The interceptor in charge of firing off notifications to cache listeners
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/ReplicationInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/ReplicationInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/ReplicationInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.*;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.interceptors.base.BaseRpcInterceptor;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.*;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.interceptors.base.BaseRpcInterceptor;
+import org.horizon.transaction.GlobalTransaction;
/**
* Takes care of replicating modifications to other nodes in a cluster. Also
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/TxInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/TxInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/TxInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,31 +19,31 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors;
+package org.horizon.interceptors;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.context.ContextFactory;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
-import org.jboss.starobrno.jmx.annotations.ManagedOperation;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.remoting.ReplicationException;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jboss.starobrno.util.concurrent.ConcurrentHashSet;
+import org.horizon.CacheException;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.config.Option;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.context.ContextFactory;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.annotations.ManagedAttribute;
+import org.horizon.annotations.ManagedOperation;
+import org.horizon.lock.LockManager;
+import org.horizon.notifications.Notifier;
+import org.horizon.remoting.RPCManager;
+import org.horizon.remoting.ReplicationException;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
+import org.horizon.util.concurrent.ConcurrentHashSet;
import javax.transaction.*;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/base/BaseRpcInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/BaseRpcInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/base/BaseRpcInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors.base;
+package org.horizon.interceptors.base;
-import org.jboss.starobrno.cluster.ReplicationQueue;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.config.Option;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
+import org.horizon.cluster.ReplicationQueue;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.config.Option;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.remoting.RPCManager;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.transaction.TransactionTable;
import org.jgroups.Address;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/base/CommandInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/CommandInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/base/CommandInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,39 +19,38 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors.base;
+package org.horizon.interceptors.base;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.commands.AbstractVisitor;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.commands.AbstractVisitor;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
/**
- * This is the base class for all interceptors to extend, and implements the {@link org.jboss.cache.commands.Visitor} interface
- * allowing it to intercept invocations on {@link org.jboss.cache.commands.VisitableCommand}s.
+ * This is the base class for all interceptors to extend, and implements the {@link org.horizon.commands.Visitor} interface
+ * allowing it to intercept invocations on {@link org.horizon.commands.VisitableCommand}s.
* <p/>
- * Commands are created either by the {@link org.jboss.cache.invocation.CacheInvocationDelegate} (for invocations on the {@link org.jboss.cache.Cache_Legacy}
- * public interface), the {@link org.jboss.cache.invocation.NodeInvocationDelegate} for invocations on the {@link org.jboss.cache.Node}
- * public interface, or by the {@link org.jboss.cache.marshall.CommandAwareRpcDispatcher} for remotely originating invocations, and
- * are passed up the interceptor chain by using the {@link org.jboss.cache.interceptors.InterceptorChain} helper class.
+ * Commands are either created by the {@link org.horizon.CacheDelegate} (for invocations on the {@link org.horizon.Cache}
+ * public interface), or by the {@link org.horizon.marshall.CommandAwareRpcDispatcher} for remotely originating invocations, and
+ * are passed up the interceptor chain by using the {@link org.horizon.interceptors.InterceptorChain} helper class.
* <p/>
- * When writing interceptors, authors can either override a specific visitXXX() method (such as {@link #visitGetKeyValueCommand(org.jboss.cache.InvocationContext , org.jboss.cache.commands.read.GetKeyValueCommand)})
- * or the more generic {@link #handleDefault(org.jboss.cache.InvocationContext , org.jboss.cache.commands.VisitableCommand)} which is the default behaviour of
- * any visit method, as defined in {@link org.jboss.cache.commands.AbstractVisitor#handleDefault(org.jboss.cache.InvocationContext , org.jboss.cache.commands.VisitableCommand)}.
+ * When writing interceptors, authors can either override a specific visitXXX() method (such as {@link #visitGetKeyValueCommand(org.horizon.context.InvocationContext, org.horizon.commands.read.GetKeyValueCommand)})
+ * or the more generic {@link #handleDefault(org.horizon.context.InvocationContext, org.horizon.commands.VisitableCommand)} which is the default behaviour of
+ * any visit method, as defined in {@link AbstractVisitor#handleDefault(org.horizon.context.InvocationContext, org.horizon.commands.VisitableCommand)}.
* <p/>
- * The preferred approach is to override the specific visitXXX() methods that are of interest rather than to override {@link #handleDefault(org.jboss.cache.InvocationContext , org.jboss.cache.commands.VisitableCommand)}
+ * The preferred approach is to override the specific visitXXX() methods that are of interest rather than to override {@link #handleDefault(org.horizon.context.InvocationContext, org.horizon.commands.VisitableCommand)}
* and then write a series of if statements or a switch block, if command-specific behaviour is needed.
* <p/>
*
* @author Mircea.Markus at jboss.com
- * @see org.jboss.cache.commands.VisitableCommand
- * @see org.jboss.cache.commands.Visitor
- * @see org.jboss.cache.interceptors.InterceptorChain
+ * @see org.horizon.commands.VisitableCommand
+ * @see org.horizon.commands.Visitor
+ * @see org.horizon.interceptors.InterceptorChain
* @since 2.2
*/
@Scope(Scopes.NAMED_CACHE)
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/base/JmxStatsCommandInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/JmxStatsCommandInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/base/JmxStatsCommandInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors.base;
+package org.horizon.interceptors.base;
-import org.jboss.cache.jmx.JmxStatisticsExposer;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
+import org.horizon.jmx.JmxStatisticsExposer;
+import org.horizon.factories.annotations.Start;
+import org.horizon.annotations.ManagedAttribute;
import java.util.Collections;
import java.util.Map;
Modified: core/branches/flat/src/main/java/org/horizon/interceptors/base/PrePostProcessingCommandInterceptor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/interceptors/base/PrePostProcessingCommandInterceptor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/interceptors/base/PrePostProcessingCommandInterceptor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,33 +19,32 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.interceptors.base;
+package org.horizon.interceptors.base;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.GravitateDataCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.commands.tx.RollbackCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.EvictCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.commands.write.ReplaceCommand;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.read.GetKeyValueCommand;
+import org.horizon.commands.read.SizeCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.commands.tx.RollbackCommand;
+import org.horizon.commands.write.ClearCommand;
+import org.horizon.commands.write.EvictCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.PutMapCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.commands.write.ReplaceCommand;
+import org.horizon.context.InvocationContext;
/**
* This interceptor adds pre and post processing to each <tt>visitXXX()</tt> method.
* <p/>
- * For each <tt>visitXXX()</tt> method invoked, it will first call {@link #doBeforeCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand)}
- * and if this method returns true, it will proceed to invoking a <tt>handleXXX()</tt> method and lastly, {@link #doAfterCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand)}
+ * For each <tt>visitXXX()</tt> method invoked, it will first call {@link #doBeforeCall(InvocationContext, VisitableCommand)}
+ * and if this method returns true, it will proceed to invoking a <tt>handleXXX()</tt> method and lastly, {@link #doAfterCall(InvocationContext, VisitableCommand)}
* in a <tt>finally</tt> block. Note that the <tt>doAfterCall()</tt> method is still invoked even if <tt>doBeforeCall()</tt> returns <tt>false</tt>.
* <p/>
* Instead of overriding <tt>visitXXX()</tt> methods, implementations should override their <tt>handleXXX()</tt> counterparts defined in this class
- * instead, as well as the {@link #doAfterCall(org.jboss.cache.InvocationContext ,org.jboss.cache.commands.VisitableCommand)} method and
- * optionally {@link #doBeforeCall(org.jboss.cache.InvocationContext, org.jboss.cache.commands.VisitableCommand)}.
+ * instead, as well as the {@link #doAfterCall(InvocationContext ,VisitableCommand)} method and
+ * optionally {@link #doBeforeCall(InvocationContext, VisitableCommand)}.
* <p/>
*
* @author Mircea.Markus at jboss.com
@@ -199,24 +198,6 @@
return handleDefault(ctx, command);
}
- @Override
- public Object visitGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
- {
- try
- {
- return (doBeforeCall(ctx, command)) ? handleGravitateDataCommand(ctx, command) : null;
- }
- finally
- {
- doAfterCall(ctx, command);
- }
- }
-
- protected Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
- {
- return handleDefault(ctx, command);
- }
-
// tx commands
@Override
Copied: core/branches/flat/src/main/java/org/horizon/invocation (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/invocation)
Modified: core/branches/flat/src/main/java/org/horizon/invocation/InvocationContextContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/invocation/InvocationContextContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/invocation/InvocationContextContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.invocation;
+package org.horizon.invocation;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.context.ContextFactory;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.context.ContextFactory;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
/**
Copied: core/branches/flat/src/main/java/org/horizon/io (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/io)
Modified: core/branches/flat/src/main/java/org/horizon/io/ByteBuffer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/io/ByteBuffer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/io/ByteBuffer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.io;
+package org.horizon.io;
import org.jgroups.util.Buffer;
Modified: core/branches/flat/src/main/java/org/horizon/io/ExposedByteArrayOutputStream.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/io/ExposedByteArrayOutputStream.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/io/ExposedByteArrayOutputStream.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.io;
+package org.horizon.io;
import net.jcip.annotations.NotThreadSafe;
Copied: core/branches/flat/src/main/java/org/horizon/jmx (from rev 7484, core/branches/flat/src/main/java/org/jboss/cache/jmx)
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapper.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/CacheJmxWrapper.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapper.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,1072 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheSPI_Legacy;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Cache_Legacy;
-import org.jboss.cache.util.CachePrinter;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.BuddyReplicationConfig;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.EvictionConfig;
-import org.jboss.starobrno.config.RuntimeConfig;
-import org.jboss.starobrno.config.parsing.JGroupsStackParser;
-import org.jboss.starobrno.config.parsing.element.BuddyElementParser;
-import org.jboss.starobrno.config.parsing.element.EvictionElementParser;
-import org.jboss.starobrno.config.parsing.element.LoadersElementParser;
-import org.jgroups.Address;
-import org.jgroups.Channel;
-import org.jgroups.ChannelFactory;
-import org.jgroups.jmx.JChannelFactoryMBean;
-import org.w3c.dom.Element;
-
-import javax.management.*;
-import javax.transaction.TransactionManager;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * Wrapper class that exposes a {@link CacheJmxWrapperMBean JMX management interface}
- *
- * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision$
- * @deprecated use {@link org.jboss.cache.jmx.JmxRegistrationManager}. This class will not be supported from 3.0 on.
- */
- at Deprecated
-public class CacheJmxWrapper<K, V>
- extends NotificationBroadcasterSupport
- implements CacheJmxWrapperMBean<K, V>, MBeanRegistration, CacheNotificationBroadcaster
-{
-
- private Log log = LogFactory.getLog(getClass().getName());
-
- private MBeanServer server;
- private String cacheObjectName;
- private boolean jmxResourceRegistered;
- private CacheSPI_Legacy<K, V> cache;
- private Configuration config;
- private boolean registerJmxResource = true;
- private final AtomicInteger listenerCount = new AtomicInteger(0);
- private final AtomicLong sequence = new AtomicLong(0);
- private final CacheNotificationListener cacheNotificationListener;
- private CacheStatus cacheStatus;
- private String notificationServiceName;
- private boolean registered;
- private boolean disableStateChangeNotifications;
-
- // Legacy config support
-
- private Element buddyReplConfig;
- private Element evictionConfig;
- private Element cacheLoaderConfig;
- private Element clusterConfig;
- private JChannelFactoryMBean multiplexerService;
-
- private BuddyElementParser buddyElementParser = new BuddyElementParser();
- private LoadersElementParser loadersElementParser = new LoadersElementParser();
- private EvictionElementParser evictionElementParser = new EvictionElementParser();
- private JGroupsStackParser stackParser = new JGroupsStackParser();
- private List<ResourceDMBean> resourceDMBeans = new ArrayList<ResourceDMBean>();
-
- // ----------------------------------------------------------- Constructors
-
- public CacheJmxWrapper()
- {
- cacheNotificationListener = new CacheNotificationListener(this);
- cacheStatus = CacheStatus.INSTANTIATED;
- }
-
- public CacheJmxWrapper(Cache_Legacy<K, V> cache)
- {
- this();
- setCache(cache);
- }
-
- // --------------------------------------------------- CacheJmxWrapperMBean
-
- public Cache_Legacy<K, V> getCache()
- {
- return cache;
- }
-
- public Configuration getConfiguration()
- {
- Configuration cfg = (cache == null ? config : cache.getConfiguration());
- if (cfg == null)
- {
- cfg = config = new Configuration();
- }
- return cfg;
- }
-
- public String printConfigurationAsString()
- {
- Configuration cfg = getConfiguration();
- return cfg == null ? "Configuration is null" : cfg.toString();
- }
-
- public String printConfigurationAsHtmlString()
- {
- Configuration cfg = getConfiguration();
- return cfg == null ? "Configuration is null" : formatHtml(cfg.toString());
- }
-
- public String printCacheDetails()
- {
- return cache == null ? "Cache is null" : CachePrinter.printCacheDetails(cache);
- }
-
- public String printCacheDetailsAsHtml()
- {
- return cache == null ? "Cache is null" : formatHtml(CachePrinter.printCacheDetails(cache));
- }
-
- public CacheStatus getCacheStatus()
- {
- return cacheStatus;
- }
-
- public int getState()
- {
- switch (cacheStatus)
- {
- case INSTANTIATED:
- case CREATING:
- return registered ? REGISTERED : UNREGISTERED;
- case CREATED:
- return CREATED;
- case STARTING:
- return STARTING;
- case STARTED:
- return STARTED;
- case STOPPING:
- return STOPPING;
- case STOPPED:
- case DESTROYING:
- return STOPPED;
- case DESTROYED:
- return registered ? DESTROYED : UNREGISTERED;
- case FAILED:
- default:
- return FAILED;
- }
- }
-
- public Address getLocalAddress()
- {
- return cache == null ? null : cache.getLocalAddress();
- }
-
- public List<Address> getMembers()
- {
- return cache == null ? null : cache.getMembers();
- }
-
- public int getNumberOfNodes()
- {
- return cache == null ? -1 : cache.getNumberOfNodes();
- }
-
- public int getNumberOfAttributes()
- {
- return cache == null ? -1 : cache.getNumberOfAttributes();
- }
-
- public String printLockInfo()
- {
- return cache == null ? "Cache is null" : CachePrinter.printCacheLockingInfo(cache);
- }
-
- public String printLockInfoAsHtml()
- {
- return cache == null ? "Cache is null" : formatHtml(CachePrinter.printCacheLockingInfo(cache));
- }
-
- public boolean getRegisterJmxResource()
- {
- return registerJmxResource;
- }
-
- public void setRegisterJmxResource(boolean register)
- {
- this.registerJmxResource = register;
- }
-
- // ---------------------------------------------------- LegacyConfiguration
-
- public Element getBuddyReplicationConfig()
- {
- return buddyReplConfig;
- }
-
- public Element getCacheLoaderConfig()
- {
- return cacheLoaderConfig;
- }
-
- public Element getCacheLoaderConfiguration()
- {
- return getCacheLoaderConfig();
- }
-
- public String getCacheMode()
- {
- return getConfiguration().getCacheModeString();
- }
-
- public String getClusterName()
- {
- return getConfiguration().getClusterName();
- }
-
- public String getClusterProperties()
- {
- return getConfiguration().getClusterConfig();
- }
-
- public Element getClusterConfig()
- {
- return clusterConfig;
- }
-
- public Element getEvictionPolicyConfig()
- {
- return evictionConfig;
- }
-
- public boolean getExposeManagementStatistics()
- {
- return getConfiguration().getExposeManagementStatistics();
- }
-
- public boolean getUseInterceptorMbeans()
- {
- return getExposeManagementStatistics();
- }
-
- public boolean getFetchInMemoryState()
- {
- return getConfiguration().isFetchInMemoryState();
- }
-
- public long getStateRetrievalTimeout()
- {
- return getConfiguration().getStateRetrievalTimeout();
- }
-
- @Deprecated
- public void setInitialStateRetrievalTimeout(long timeout)
- {
- setStateRetrievalTimeout(timeout);
- }
-
- public String getIsolationLevel()
- {
- return getConfiguration().getIsolationLevelString();
- }
-
- public long getLockAcquisitionTimeout()
- {
- return getConfiguration().getLockAcquisitionTimeout();
- }
-
- public JChannelFactoryMBean getMultiplexerService()
- {
- return multiplexerService;
- }
-
- public String getMultiplexerStack()
- {
- return getConfiguration().getMultiplexerStack();
- }
-
- public ChannelFactory getMuxChannelFactory()
- {
- return getConfiguration().getRuntimeConfig().getMuxChannelFactory();
- }
-
- public long getReplQueueInterval()
- {
- return getConfiguration().getReplQueueInterval();
- }
-
- public int getReplQueueMaxElements()
- {
- return getConfiguration().getReplQueueMaxElements();
- }
-
- public String getReplicationVersion()
- {
- return getConfiguration().getReplVersionString();
- }
-
- public boolean getSyncCommitPhase()
- {
- return getConfiguration().isSyncCommitPhase();
- }
-
- public long getSyncReplTimeout()
- {
- return getConfiguration().getSyncReplTimeout();
- }
-
- public boolean getSyncRollbackPhase()
- {
- return getConfiguration().isSyncRollbackPhase();
- }
-
- public TransactionManager getTransactionManager()
- {
- return getConfiguration().getRuntimeConfig().getTransactionManager();
- }
-
- public String getTransactionManagerLookupClass()
- {
- return getConfiguration().getTransactionManagerLookupClass();
- }
-
- @Deprecated
- @SuppressWarnings("deprecation")
- public boolean getUseRegionBasedMarshalling()
- {
- return getConfiguration().isUseRegionBasedMarshalling();
- }
-
- public boolean isUseLazyDeserialization()
- {
- return getConfiguration().isUseLazyDeserialization();
- }
-
- public boolean getUseReplQueue()
- {
- return getConfiguration().isUseReplQueue();
- }
-
- public boolean isInactiveOnStartup()
- {
- return getConfiguration().isInactiveOnStartup();
- }
-
- public void setBuddyReplicationConfig(Element config)
- {
- BuddyReplicationConfig brc = null;
- if (config != null)
- {
- brc = buddyElementParser.parseBuddyElement(config);
- }
- getConfiguration().setBuddyReplicationConfig(brc);
- this.buddyReplConfig = config;
- }
-
- public void setCacheLoaderConfig(Element cacheLoaderConfig)
- {
- CacheLoaderConfig clc = null;
- if (cacheLoaderConfig != null)
- {
- clc = loadersElementParser.parseLoadersElement(cacheLoaderConfig);
- }
- getConfiguration().setCacheLoaderConfig(clc);
- this.cacheLoaderConfig = cacheLoaderConfig;
- }
-
- public void setCacheLoaderConfiguration(Element config)
- {
- log.warn("MBean attribute 'CacheLoaderConfiguration' is deprecated; " +
- "use 'CacheLoaderConfig'");
- setCacheLoaderConfig(config);
- }
-
- public void setCacheMode(String mode) throws Exception
- {
- getConfiguration().setCacheModeString(mode);
- }
-
- public void setClusterConfig(Element config)
- {
- String props = null;
- if (config != null)
- {
- stackParser.parseClusterConfigXml(config);
- }
- getConfiguration().setClusterConfig(props);
- this.clusterConfig = config;
- }
-
- @Deprecated
- public long getInitialStateRetrievalTimeout()
- {
- return getStateRetrievalTimeout();
- }
-
- public void setClusterName(String name)
- {
- getConfiguration().setClusterName(name);
- }
-
- public void setClusterProperties(String cluster_props)
- {
- getConfiguration().setClusterConfig(cluster_props);
- }
-
- public void setEvictionPolicyConfig(Element config)
- {
- EvictionConfig ec = null;
- if (config != null)
- {
- ec = evictionElementParser.parseEvictionElement(config);
- }
- getConfiguration().setEvictionConfig(ec);
- this.evictionConfig = config;
- }
-
- public void setExposeManagementStatistics(boolean expose)
- {
- getConfiguration().setExposeManagementStatistics(expose);
- }
-
- public void setUseInterceptorMbeans(boolean use)
- {
- log.warn("MBean attribute 'UseInterceptorMbeans' is deprecated; " +
- "use 'ExposeManagementStatistics'");
- setExposeManagementStatistics(use);
- }
-
- public void setFetchInMemoryState(boolean flag)
- {
- getConfiguration().setFetchInMemoryState(flag);
- }
-
- public void setInactiveOnStartup(boolean inactiveOnStartup)
- {
- getConfiguration().setInactiveOnStartup(inactiveOnStartup);
- }
-
- public void setStateRetrievalTimeout(long timeout)
- {
- getConfiguration().setStateRetrievalTimeout(timeout);
- }
-
- public void setIsolationLevel(String level)
- {
- getConfiguration().setIsolationLevelString(level);
- }
-
- public void setLockAcquisitionTimeout(long timeout)
- {
- getConfiguration().setLockAcquisitionTimeout(timeout);
- }
-
- public void setMultiplexerService(JChannelFactoryMBean muxService)
- {
- this.multiplexerService = muxService;
- }
-
- public void setMultiplexerStack(String stackName)
- {
- getConfiguration().setMultiplexerStack(stackName);
- }
-
- public void setMuxChannelFactory(ChannelFactory factory)
- {
- getConfiguration().getRuntimeConfig().setMuxChannelFactory(factory);
- }
-
- public void setReplQueueInterval(long interval)
- {
- getConfiguration().setReplQueueInterval(interval);
- }
-
- public void setReplQueueMaxElements(int max_elements)
- {
- getConfiguration().setReplQueueMaxElements(max_elements);
- }
-
- public void setReplicationVersion(String version)
- {
- getConfiguration().setReplVersionString(version);
- }
-
- public void setSyncCommitPhase(boolean sync_commit_phase)
- {
- getConfiguration().setSyncCommitPhase(sync_commit_phase);
- }
-
- public void setSyncReplTimeout(long timeout)
- {
- getConfiguration().setSyncReplTimeout(timeout);
- }
-
- public void setSyncRollbackPhase(boolean sync_rollback_phase)
- {
- getConfiguration().setSyncRollbackPhase(sync_rollback_phase);
- }
-
- public void setTransactionManager(TransactionManager manager)
- {
- getConfiguration().getRuntimeConfig().setTransactionManager(manager);
- }
-
- public void setTransactionManagerLookupClass(String cl) throws Exception
- {
- getConfiguration().setTransactionManagerLookupClass(cl);
- }
-
- @Deprecated
- @SuppressWarnings("deprecation")
- public void setUseRegionBasedMarshalling(boolean isTrue)
- {
- getConfiguration().setUseRegionBasedMarshalling(isTrue);
- }
-
- public void setUseReplQueue(boolean flag)
- {
- getConfiguration().setUseReplQueue(flag);
- }
-
- // -------------------------------------------------------------- Lifecycle
-
- public void create() throws CacheException
- {
- if (!cacheStatus.createAllowed())
- {
- if (cacheStatus.needToDestroyFailedCache())
- destroy();
- else
- return;
- }
-
- try
- {
- cacheStatus = CacheStatus.CREATING;
-
- if (cache == null)
- {
- if (config == null)
- {
- throw new ConfigurationException("Must call setConfiguration() or setCache() before call to create()");
- }
-
- constructCache();
- }
-
- cache.create();
-
- cacheStatus = CacheStatus.CREATED;
- }
- catch (Throwable t)
- {
- handleLifecycleTransitionFailure(t);
- }
- }
-
- public void start() throws CacheException
- {
- if (!cacheStatus.startAllowed())
- {
- if (cacheStatus.needToDestroyFailedCache())
- destroy(); // this will take us back to DESTROYED
-
- if (cacheStatus.needCreateBeforeStart())
- create();
- else
- return;
- }
-
- try
- {
- int oldState = getState();
- cacheStatus = CacheStatus.STARTING;
- int startingState = getState();
- sendStateChangeNotification(oldState, startingState, getClass().getSimpleName() + " starting", null);
-
- cache.start();
-
- registerJmxResources();
-
- cacheStatus = CacheStatus.STARTED;
- sendStateChangeNotification(startingState, getState(), getClass().getSimpleName() + " started", null);
- }
- catch (Throwable t)
- {
- handleLifecycleTransitionFailure(t);
- }
- }
-
- public void stop()
- {
- if (!cacheStatus.stopAllowed())
- {
- return;
- }
-
- // Trying to stop() from FAILED is valid, but may not work
- boolean failed = cacheStatus == CacheStatus.FAILED;
-
- try
- {
- int oldState = getState();
- cacheStatus = CacheStatus.STOPPING;
- int stoppingState = getState();
- sendStateChangeNotification(oldState, stoppingState, getClass().getSimpleName() + " stopping", null);
-
- cache.stop();
-
- if (cache.getCacheStatus() == CacheStatus.DESTROYED)
- {
- // Cache was already destroyed externally;
- // so get rid of the jmx resources
- unregisterJmxResources();
- }
-
- cacheStatus = CacheStatus.STOPPED;
- sendStateChangeNotification(stoppingState, getState(), getClass().getSimpleName() + " stopped", null);
- }
- catch (Throwable t)
- {
- if (failed)
- {
- log.warn("Attempted to stop() from FAILED state, " +
- "but caught exception; try calling destroy()", t);
- }
- handleLifecycleTransitionFailure(t);
- }
- }
-
- public void destroy()
- {
- if (!cacheStatus.destroyAllowed())
- {
- if (cacheStatus.needStopBeforeDestroy())
- {
- try
- {
- stop();
- }
- catch (CacheException e)
- {
- log.warn("Needed to call stop() before destroying but stop() " +
- "threw exception. Proceeding to destroy", e);
- }
- }
- else
- return;
- }
-
- try
- {
- cacheStatus = CacheStatus.DESTROYING;
-
- // The cache is destroyed, so we shouldn't leave the ResourcesDMBean
- // in JMX, even if we didn't register them in create
- unregisterJmxResources();
-
- if (cache != null)
- cache.destroy();
- }
- finally
- {
- // We always proceed to DESTROYED
- cacheStatus = CacheStatus.DESTROYED;
- }
- }
-
- // ------------------------------------------------------ MBeanRegistration
-
- /**
- * Caches the provided <code>server</code> and <code>objName</code>.
- */
- public ObjectName preRegister(MBeanServer server, ObjectName objName)
- throws Exception
- {
- this.server = server;
- if (cacheObjectName == null)
- {
- if (objName != null)
- {
- cacheObjectName = objName.getCanonicalName();
- }
- else
- {
- getCacheObjectName();
- }
- }
- // Inform our CacheNotificationListener of the ObjectName it should transmit
- if (notificationServiceName == null) notificationServiceName = cacheObjectName;
- cacheNotificationListener.setServiceName(notificationServiceName);
- return new ObjectName(cacheObjectName);
- }
-
- /**
- * Registers the cache's MBean resources, if {@link #getRegisterJmxResource()}
- * is <code>true</code>.
- */
- public void postRegister(Boolean registrationDone)
- {
- if (Boolean.TRUE.equals(registrationDone))
- {
- log.debug("Registered in JMX under " + cacheObjectName);
- if (cache != null && CacheStatus.STARTED.equals(cache.getCacheStatus()))
- {
- try
- {
- registerJmxResources();
- }
- catch (Exception e)
- {
- log.error("Caught exception registering cache ResourcesDMBean with JMX", e);
- }
- }
-
- registered = true;
- }
- }
-
- /**
- * No-op.
- */
- public void preDeregister() throws Exception
- {
- }
-
- /**
- * Unregisters the ResourcesDMBean, if {@link #getRegisterJmxResource()} is
- * <code>true</code>.
- */
- public void postDeregister()
- {
- unregisterJmxResources();
-
- server = null;
- registered = false;
- }
-
- // --------------------------------------------------------- Public methods
-
- /**
- * Sets the configuration that the underlying cache should use.
- *
- * @param config the configuration
- * @throws IllegalArgumentException if <code>config</code> is <code>null</code>.
- */
- public void setConfiguration(Configuration config)
- {
- this.config = config;
- }
-
- /**
- * Allows direct injection of the underlying cache.
- *
- * @param cache
- */
- public void setCache(Cache_Legacy<K, V> cache)
- {
- if (cacheStatus != CacheStatus.INSTANTIATED
- && cacheStatus != CacheStatus.CREATING
- && cacheStatus != CacheStatus.DESTROYED)
- {
- throw new IllegalStateException("Cannot set underlying cache after call to create()");
- }
-
- this.cache = (CacheSPI_Legacy<K, V>) cache;
- this.config = (cache == null ? null : cache.getConfiguration());
- synchronized (listenerCount)
- {
- if (listenerCount.get() > 0 && cache != null)
- {
- cache.addCacheListener(cacheNotificationListener);
- }
- }
- }
-
- public String getCacheObjectName()
- {
- if (cacheObjectName == null)
- {
- if (config.getClusterName() == null)
- {
- cacheObjectName = JmxRegistrationManager.LOCAL_CACHE_PREFIX + "Cache" + System.currentTimeMillis();
- }
- else
- {
- cacheObjectName = JmxRegistrationManager.REPLICATED_CACHE_PREFIX + config.getClusterName();
- }
- }
- return cacheObjectName;
- }
-
- public void setCacheObjectName(String name) throws MalformedObjectNameException
- {
- if (name != null)
- {
- // test the name
- new ObjectName(name);
- }
- this.cacheObjectName = name;
- }
-
- /**
- * Gets whether sending of JMX notifications for this mbean's
- * start/stop lifecycle changes is disabled.
- *
- * @see #setDisableStateChangeNotifications(boolean)
- */
- public boolean isDisableStateChangeNotifications()
- {
- return disableStateChangeNotifications;
- }
-
- /**
- * Hook to allow PojoCacheJmxWrapper to suppress state change
- * notifications from this mbean in lieu of its own.
- *
- * @param disableStateChangeNotifications
- *
- */
- public void setDisableStateChangeNotifications(boolean disableStateChangeNotifications)
- {
- this.disableStateChangeNotifications = disableStateChangeNotifications;
- }
-
- public MBeanServer getMBeanServer()
- {
- return server;
- }
-
- /**
- * Formats a given String for display as an HTML snippet.
- *
- * @param s string to format
- * @return formatted string
- */
- public static String formatHtml(String s)
- {
- s = s.replaceAll("\r\n", "<br />");
- s = s.replaceAll("\r", "<br />");
- s = s.replaceAll("\n", "<br />");
- s = s.replaceAll("\t", " ");
- s = s.replaceAll(" ", " ");
- return s;
- }
-
- public String getNotificationServiceName()
- {
- return notificationServiceName;
- }
-
- public void setNotificationServiceName(String notificationServiceName)
- {
- this.notificationServiceName = notificationServiceName;
- this.cacheNotificationListener.setServiceName(notificationServiceName);
- }
-
- public long getNextNotificationSequenceNumber()
- {
- return sequence.getAndIncrement();
- }
-
- // ---------------------------------------------------- Superclass Overrides
-
- @Override
- public void addNotificationListener(NotificationListener notificationListener, NotificationFilter notificationFilter, Object object) throws IllegalArgumentException
- {
- super.addNotificationListener(notificationListener, notificationFilter, object);
- notificationRegistration(true);
- }
-
- @Override
- public void removeNotificationListener(NotificationListener notificationListener) throws ListenerNotFoundException
- {
- super.removeNotificationListener(notificationListener);
- notificationRegistration(false);
- }
-
- @Override
- public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
- {
- super.removeNotificationListener(listener, filter, handback);
- notificationRegistration(false);
- }
-
- @Override
- public MBeanNotificationInfo[] getNotificationInfo()
- {
- return CacheNotificationListener.getNotificationInfo();
- }
-
- // ------------------------------------------------------ Protected Methods
-
- protected void constructCache() throws ConfigurationException
- {
- log.debug("Constructing Cache");
- //CacheFactory<K, V> cf = new DefaultCacheFactory<K, V>();
- throw new UnsupportedOperationException("Fix me to use a flat cache!!");
-// setCache(cf.createCache(config, false));
-// if (multiplexerService != null)
-// {
-// injectMuxChannel();
-// }
- }
-
- protected boolean registerJmxResources() throws CacheException
- {
- if (registerJmxResource && config.getExposeManagementStatistics() && !jmxResourceRegistered && server != null)
- {
- log.debug("Registering jmx resources");
- JmxRegistrationManager registrationManager = new JmxRegistrationManager(server, cache, this.cacheObjectName);
- registrationManager.registerAllMBeans();
- jmxResourceRegistered = true;
- return true;
- }
- return false;
- }
-
- protected void unregisterJmxResources()
- {
- if (registerJmxResource && jmxResourceRegistered && server != null)
- {
- log.debug("Unregistering interceptors");
- JmxRegistrationManager registrationManager = new JmxRegistrationManager(server, cache, this.cacheObjectName);
- registrationManager.unregisterAllMBeans();
- jmxResourceRegistered = false;
- }
- }
-
- // -------------------------------------------------------- Private methods
-
- private void injectMuxChannel() throws CacheException
- {
- Configuration cfg = getConfiguration();
- RuntimeConfig rtcfg = cfg.getRuntimeConfig();
-
- // Only inject if there isn't already a channel or factory
- if (rtcfg.getMuxChannelFactory() == null && rtcfg.getChannel() == null)
- {
- Channel ch;
- try
- {
- ch = multiplexerService.createMultiplexerChannel(cfg.getMultiplexerStack(), cfg.getClusterName());
- }
- catch (Exception e)
- {
- throw new CacheException("Exception creating multiplexed channel", e);
- }
- rtcfg.setChannel(ch);
- }
- }
-
-
- /**
- * Adds and removes the CacheListener.
- * A counter is used to determine whether we have any clients who are
- * registered for notifications from this mbean. When the count is zero,
- * we don't need to listen to cache events, so we remove the CacheListener.
- * Note that a client who terminates without unregistering for notifications
- * will leave the count greater than zero so we'll still listen in that case.
- *
- * @param add <code>true</code> if the event was a listerner addition,
- * <code>false</code> if it was a removal
- */
- private void notificationRegistration(boolean add)
- {
- // This method adds and removes the CacheImpl listener.
- // The m_listeners counter is used to determine whether
- // we have any clients who are registered for notifications
- // from this mbean. When the count is zero, we don't need to
- // listen to cache events. Note that a client who terminates
- // without unregistering for notifications will leave the count
- // greater than zero so we'll still listen in that case.
- synchronized (listenerCount)
- {
- if (add)
- {
- listenerCount.incrementAndGet();
- if (cache != null)
- cache.addCacheListener(cacheNotificationListener);
- }
- else
- {
- if (listenerCount.decrementAndGet() <= 0)
- {
- if (cache != null)
- cache.removeCacheListener(cacheNotificationListener);
-
- listenerCount.set(0);
- }
- }
- }
- }
-
- /**
- * Sets the cacheStatus to FAILED and rethrows the problem as one
- * of the declared types. Converts any non-RuntimeException Exception
- * to CacheException.
- *
- * @param t
- * @throws CacheException
- * @throws RuntimeException
- * @throws Error
- */
- private void handleLifecycleTransitionFailure(Throwable t)
- throws RuntimeException, Error
- {
- int oldState = getState();
- cacheStatus = CacheStatus.FAILED;
- sendStateChangeNotification(oldState, getState(), getClass().getSimpleName() + " failed", t);
-
- if (t instanceof CacheException)
- throw (CacheException) t;
- else if (t instanceof RuntimeException)
- throw (RuntimeException) t;
- else if (t instanceof Error)
- throw (Error) t;
- else
- throw new CacheException(t);
- }
-
- /**
- * Helper for sending out state change notifications
- */
- private void sendStateChangeNotification(int oldState, int newState, String msg, Throwable t)
- {
- if (isDisableStateChangeNotifications())
- return;
-
- long now = System.currentTimeMillis();
-
- AttributeChangeNotification stateChangeNotification = new AttributeChangeNotification(
- this,
- getNextNotificationSequenceNumber(), now, msg,
- "State", "java.lang.Integer",
- oldState, newState);
-
- stateChangeNotification.setUserData(t);
-
- sendNotification(stateChangeNotification);
- }
-}
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapperMBean.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/CacheJmxWrapperMBean.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/CacheJmxWrapperMBean.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,193 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Cache_Legacy;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.Configuration;
-import org.jgroups.Address;
-
-import java.util.List;
-
-/**
- * JMX interface to the {@link org.jboss.cache.Cache_Legacy}. Full access to the cache is not supported, only a certain
- * set of operations are exposed via JMX:
- * <p/>
- * <ol>
- * <li> Lifecycle methods - create, start, stop, destroy</li>
- * <li> Configuration (read-only) getter - which retrieves a String (or formatted HTML for web based JMX consoles) representation of the configuration</li>
- * <li> Properties exposing {@link Configuration} elements</li>
- * <li> Cache information methods (numNodes, numAttributes, lockInfo, printDetails) which print as Strings or as formatted HTML (for web based JMX consoles)</li>
- *
- * @since 2.0.0
- * @deprecated use {@link org.jboss.cache.jmx.JmxRegistrationManager}
- */
- at Deprecated
-public interface CacheJmxWrapperMBean<K, V> extends LegacyConfiguration
-{
- /**
- * The lifecycle method stop has completed
- */
- int STOPPED = 0;
- /**
- * The lifecycle method stop has been invoked
- */
- int STOPPING = 1;
- /**
- * The lifecycle method start has been invoked
- */
- int STARTING = 2;
- /**
- * The lifecycle method start has completed
- */
- int STARTED = 3;
- /**
- * There has been an error during some operation
- */
- int FAILED = 4;
- /**
- * The lifecycle method destroy has completed
- */
- int DESTROYED = 5;
- /**
- * The lifecycle method create has completed
- */
- int CREATED = 6;
- /**
- * The MBean has been instantiated but has not completed MBeanRegistration.postRegister
- */
- int UNREGISTERED = 7;
- /**
- * The MBean has been instantiated and has completed MBeanRegistration.postRegister
- */
- int REGISTERED = 8;
-
- void create() throws CacheException;
-
- void start() throws CacheException;
-
- void stop();
-
- void destroy();
-
- /**
- * Gets where this object is in its lifecycle transitions.
- *
- * @return the current status. Will not return <code>null</code>
- */
- CacheStatus getCacheStatus();
-
- /**
- * Legacy attribute to expose the {@link #getCacheStatus() cache status}
- * in terms of the JBoss AS ServiceMBean values. This interface does
- * not extend ServiceMBean, but this attribute is retained to provide
- * compatibility with the JBoss AS JSR-77 integration layer.
- *
- * @return the current status, e.g. {@link #STARTED}.
- */
- int getState();
-
- /**
- * Retrieves a reference to the underlying {@link org.jboss.cache.Cache_Legacy}
- */
- Cache_Legacy<K, V> getCache();
-
- /**
- * @return an immutable configuration
- */
- Configuration getConfiguration();
-
- /**
- * @return a string based representation of the configuration
- */
- String printConfigurationAsString();
-
- /**
- * @return an HTML formatted string based representation of the configuration
- */
- String printConfigurationAsHtmlString();
-
- /**
- * @return details of nodes in the cache
- */
- String printCacheDetails();
-
- /**
- * @return details of nodes in the cache, formatted as HTML
- */
- String printCacheDetailsAsHtml();
-
- /**
- * Returns the local address of this cache in a cluster, or <code>null</code>
- * if running in local mode.
- *
- * @return the local address of this cache in a cluster, or <code>null</code>
- * if running in local mode.
- */
- Address getLocalAddress();
-
- /**
- * Returns a list of members in the cluster, or <code>null</code>
- * if running in local mode.
- *
- * @return a {@link List} of members in the cluster, or <code>null</code>
- * if running in local mode.
- */
- List<Address> getMembers();
-
- /**
- * @return number of nodes in the cache
- */
- int getNumberOfNodes();
-
- /**
- * @return number of attributes in the cache
- */
- int getNumberOfAttributes();
-
- /**
- * @return information on the state of node locks
- */
- String printLockInfo();
-
- /**
- * @return information on the state of node locks, formatted as HTML
- */
- String printLockInfoAsHtml();
-
- /**
- * Gets whether this object should register the cache's interceptors
- * with JMX during {@link #create()}.
- * <p/>
- * Default is <code>true</code>.
- */
- boolean getRegisterJmxResource();
-
- /**
- * Sets whether this object should register the cache's interceptors
- * with JMX during {@link #create()}.
- * <p/>
- * Default is <code>true</code>.
- */
- void setRegisterJmxResource(boolean register);
-}
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationBroadcaster.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/CacheNotificationBroadcaster.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationBroadcaster.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-import javax.management.Notification;
-import javax.management.NotificationEmitter;
-
-public interface CacheNotificationBroadcaster extends NotificationEmitter
-{
- // Notification Types
- String
- NOTIF_CACHE_STARTED = "org.jboss.cache.CacheStarted",
- NOTIF_CACHE_STOPPED = "org.jboss.cache.CacheStopped",
- NOTIF_CACHE_ENTRY_CREATED = "org.jboss.cache.NodeCreated",
- NOTIF_CACHE_ENTRY_MODIFIED = "org.jboss.cache.NodeModified",
- NOTIF_CACHE_ENTRY_REMOVED = "org.jboss.cache.NodeRemoved",
- NOTIF_CACHE_ENTRY_VISITED = "org.jboss.cache.NodeVisited",
- NOTIF_CACHE_ENTRY_EVICTED = "org.jboss.cache.NodeEvicted",
- NOTIF_CACHE_ENTRY_LOADED = "org.jboss.cache.NodeLoaded",
- NOTIF_CACHE_ENTRY_ACTIVATED = "org.jboss.cache.NodeActivated",
- NOTIF_CACHE_ENTRY_PASSIVATED = "org.jboss.cache.NodePassivated",
- NOTIF_VIEW_CHANGED = "org.jboss.cache.ViewChanged";
-
- /**
- * Sends a notification to any interested NotificationListener.
- *
- * @param notification the notification to send
- */
- void sendNotification(Notification notification);
-
- /**
- * Gets the sequence number for the next notification.
- */
- long getNextNotificationSequenceNumber();
-
-}
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationListener.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/CacheNotificationListener.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/CacheNotificationListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,193 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-import org.jboss.starobrno.notifications.annotation.CacheEntryActivated;
-import org.jboss.starobrno.notifications.annotation.CacheEntryCreated;
-import org.jboss.starobrno.notifications.annotation.CacheEntryEvicted;
-import org.jboss.starobrno.notifications.annotation.CacheEntryLoaded;
-import org.jboss.starobrno.notifications.annotation.CacheEntryModified;
-import org.jboss.starobrno.notifications.annotation.CacheEntryPassivated;
-import org.jboss.starobrno.notifications.annotation.CacheEntryRemoved;
-import org.jboss.starobrno.notifications.annotation.CacheEntryVisited;
-import org.jboss.starobrno.notifications.annotation.CacheListener;
-import org.jboss.starobrno.notifications.annotation.CacheStarted;
-import org.jboss.starobrno.notifications.annotation.CacheStopped;
-import org.jboss.starobrno.notifications.annotation.ViewChanged;
-import org.jboss.starobrno.notifications.event.CacheEntryEvent;
-import org.jboss.starobrno.notifications.event.Event;
-import org.jboss.starobrno.notifications.event.ViewChangedEvent;
-
-import javax.management.MBeanNotificationInfo;
-import javax.management.Notification;
-
-/**
- * A CacheListener that creates JMX notifications from listener
- * events.
- *
- * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision$
- */
- at CacheListener
-public class CacheNotificationListener
-{
- // Notification Messages
- private static final String MSG_CACHE_STARTED = "Cache has been started.";
- private static final String MSG_CACHE_STOPPED = "Cache has been stopped.";
- private static final String MSG_CACHE_ENTRY_CREATED = "Node has been created.";
- private static final String MSG_CACHE_ENTRY_MODIFIED = "Node has been modifed.";
- private static final String MSG_CACHE_ENTRY_REMOVED = "Node has been removed.";
- private static final String MSG_CACHE_ENTRY_VISITED = "Node has been visited.";
- private static final String MSG_CACHE_ENTRY_EVICTED = "Node has been evicted.";
- private static final String MSG_CACHE_ENTRY_LOADED = "Node has been loaded.";
- private static final String MSG_CACHE_ENTRY_ACTIVATED = "Node has been activated.";
- private static final String MSG_CACHE_ENTRY_PASSIVATED = "Node has been passivated.";
- private static final String MSG_VIEW_CHANGED = "Cache cluster view has changed.";
-
- // Notification Info
- private static final String NOTIFICATION_NAME = Notification.class.getName();
- private static final String NOTIFICATION_DESCR = "JBossCache event notifications";
-
- private final CacheNotificationBroadcaster broadcaster;
- private String serviceName;
-
- // ------------------------------------------------------------ Constructors
-
- CacheNotificationListener(CacheNotificationBroadcaster support)
- {
- this.broadcaster = support;
- }
-
- // ----------------------------------------------------------- PublicMethods
-
- public String getServiceName()
- {
- return serviceName;
- }
-
- public void setServiceName(String serviceName)
- {
- this.serviceName = serviceName;
- }
-
- public static MBeanNotificationInfo[] getNotificationInfo()
- {
- String[] types = new String[]
- {
- CacheNotificationBroadcaster.NOTIF_CACHE_STARTED,
- CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_CREATED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_EVICTED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_LOADED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_MODIFIED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_ACTIVATED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_PASSIVATED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_REMOVED,
- CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_VISITED,
- CacheNotificationBroadcaster.NOTIF_VIEW_CHANGED,
- };
-
- MBeanNotificationInfo info = new MBeanNotificationInfo(types, NOTIFICATION_NAME, NOTIFICATION_DESCR);
- return new MBeanNotificationInfo[]{info};
- }
-
- // ----------------------------------------------------------- CacheListener
-
- @CacheStarted
- @CacheStopped
- @CacheEntryCreated
- @CacheEntryEvicted
- @CacheEntryLoaded
- @CacheEntryModified
- @CacheEntryRemoved
- @CacheEntryVisited
- @CacheEntryActivated
- @CacheEntryPassivated
- @ViewChanged
- public void broadcast(Event e)
- {
- CacheEntryEvent ne;
- Notification n = null;
- switch (e.getType())
- {
- case CACHE_STARTED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STARTED, broadcaster, seq(), MSG_CACHE_STARTED);
- n.setUserData(serviceName);
- break;
- case CACHE_STOPPED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED, broadcaster, seq(), MSG_CACHE_STOPPED);
- n.setUserData(serviceName);
- break;
- case CACHE_ENTRY_CREATED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_CREATED, broadcaster, seq(), MSG_CACHE_ENTRY_CREATED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre(), ne.isOriginLocal()});
- break;
- case CACHE_ENTRY_EVICTED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_EVICTED, broadcaster, seq(), MSG_CACHE_ENTRY_EVICTED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre(), ne.isOriginLocal()});
- break;
- case CACHE_ENTRY_LOADED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_LOADED, broadcaster, seq(), MSG_CACHE_ENTRY_LOADED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre()});
- break;
- case CACHE_ENTRY_MODIFIED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_MODIFIED, broadcaster, seq(), MSG_CACHE_ENTRY_MODIFIED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre(), ne.isOriginLocal()});
- break;
- case CACHE_ENTRY_REMOVED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_REMOVED, broadcaster, seq(), MSG_CACHE_ENTRY_REMOVED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre(), ne.isOriginLocal()});
- break;
- case CACHE_ENTRY_VISITED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_VISITED, broadcaster, seq(), MSG_CACHE_ENTRY_VISITED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre()});
- break;
- case CACHE_ENTRY_ACTIVATED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_ACTIVATED, broadcaster, seq(), MSG_CACHE_ENTRY_ACTIVATED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre()});
- break;
- case CACHE_ENTRY_PASSIVATED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_ENTRY_PASSIVATED, broadcaster, seq(), MSG_CACHE_ENTRY_PASSIVATED);
- ne = (CacheEntryEvent) e;
- n.setUserData(new Object[]{ne.getKey().toString(), e.isPre()});
- break;
- case VIEW_CHANGED:
- n = new Notification(CacheNotificationBroadcaster.NOTIF_VIEW_CHANGED, broadcaster, seq(), MSG_VIEW_CHANGED);
- n.setUserData(((ViewChangedEvent) e).getNewView().toString());
- break;
- }
-
- broadcaster.sendNotification(n);
- }
-
- private long seq()
- {
- return broadcaster.getNextNotificationSequenceNumber();
- }
-}
Modified: core/branches/flat/src/main/java/org/horizon/jmx/JmxRegistrationManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/JmxRegistrationManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/JmxRegistrationManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,16 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx;
+package org.horizon.jmx;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.Cache_Legacy;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.ComponentRegistry;
+import org.horizon.Cache;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.factories.ComponentRegistry;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
@@ -97,10 +96,6 @@
processBaseName(objectNameBase);
}
- public JmxRegistrationManager(MBeanServer mBeanServer, Cache_Legacy cache, String objectNameBase) {
- throw new UnsupportedOperationException("Remove any code that relies on this!");
- }
-
/**
* @throws IllegalArgumentException if the supplied objectNameBase name isn't valid
*/
@@ -132,7 +127,8 @@
/**
* Performs the MBean registration.
*/
- public void registerAllMBeans() throws CacheException {
+ public void registerAllMBeans() throws CacheException
+ {
try {
List<ResourceDMBean> resourceDMBeans = getResourceDMBeans();
for (ResourceDMBean resource : resourceDMBeans) {
Modified: core/branches/flat/src/main/java/org/horizon/jmx/JmxStatisticsExposer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/JmxStatisticsExposer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/JmxStatisticsExposer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx;
+package org.horizon.jmx;
import java.util.Map;
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/JmxUtil.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/JmxUtil.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/JmxUtil.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-
-import org.jboss.cache.Cache_Legacy;
-import org.jboss.starobrno.config.Configuration;
-
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-/**
- * Various JMX related utilities
- *
- * @author Jerry Gauthier
- * @author Manik Surtani
- * @version $Id$
- */
- at Deprecated
-public class JmxUtil
-{
- public static final String JBOSS_SERVER_DOMAIN = "jboss";
- public static final String JBOSS_CACHE_DOMAIN = "jboss.cache";
- public static final String SERVICE_KEY_NAME = "service";
- public static final String BASE_PREFIX = JBOSS_CACHE_DOMAIN + ":" + SERVICE_KEY_NAME + "=JBossCache";
- public static final String CLUSTER_KEY = "cluster";
- public static final String PREFIX = BASE_PREFIX + "," + CLUSTER_KEY + "=";
- public static final String UNIQUE_ID_KEY = "uniqueId";
- public static final String NO_CLUSTER_PREFIX = BASE_PREFIX + "," + UNIQUE_ID_KEY + "=";
- public static final String CACHE_TYPE_KEY = "cacheType";
- public static final String PLAIN_CACHE_TYPE = "Cache";
- public static final String MBEAN_CLASS_SUFFIX = "MBean";
- public static final String JMX_RESOURCE_KEY = ",jmx-resource=";
-
- public static void registerCacheMBean(MBeanServer server, CacheJmxWrapperMBean cache, String cacheObjectName)
- throws JMException
- {
- ObjectName on = new ObjectName(cacheObjectName);
- if (!server.isRegistered(on))
- {
- server.registerMBean(cache, on);
- }
- }
-
- public static String getDefaultCacheObjectName(Cache_Legacy cache)
- {
- // get the cache's registration name
- return getDefaultCacheObjectName(cache.getConfiguration(), cache.getClass().getName());
- }
-
- public static String getDefaultCacheObjectName(Configuration config, String cacheImplClass)
- {
- // get the cache's registration name
- String tmpName;
- if (config.getClusterName() == null)
- {
- tmpName = NO_CLUSTER_PREFIX + getUniqueId(cacheImplClass);
- }
- else
- {
- tmpName = PREFIX + config.getClusterName();
- }
- return tmpName;
- }
-
- public static String getUniqueId(String cacheImplClass)
- {
- return cacheImplClass + System.currentTimeMillis();
- }
-
- public static void unregisterCacheMBean(MBeanServer server, String cacheObjectName)
- throws Exception
- {
- server.unregisterMBean(new ObjectName(cacheObjectName));
- }
-}
Deleted: core/branches/flat/src/main/java/org/horizon/jmx/LegacyConfiguration.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/LegacyConfiguration.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/LegacyConfiguration.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,361 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.cache.jmx;
-
-import org.jboss.cache.Region;
-import org.jgroups.ChannelFactory;
-import org.jgroups.jmx.JChannelFactoryMBean;
-import org.w3c.dom.Element;
-
-import javax.transaction.TransactionManager;
-
-/**
- * Legacy configuration attributes from JBC 1.x.
- *
- * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision$
- * @deprecated use {@link org.jboss.cache.jmx.JmxRegistrationManager}
- */
- at Deprecated
-public interface LegacyConfiguration
-{
- /**
- * Get the name of the replication group
- */
- String getClusterName();
-
- /**
- * Set the name of the replication group
- */
- void setClusterName(String name);
-
- /**
- * Sets whether marshalling uses scoped class loaders on a per region basis.
- * <p/>
- * This property must be set to <code>true</code> before any call to
- * {@link Region#registerContextClassLoader(ClassLoader)}.
- *
- * @param isTrue
- */
- void setUseRegionBasedMarshalling(boolean isTrue);
-
- /**
- * Gets whether marshalling uses scoped class loaders on a per region basis.
- *
- * @return true if region based marshalling is used.
- */
- boolean getUseRegionBasedMarshalling();
-
- /**
- * Gets whether the cache should create interceptor mbeans
- * that are used to capture and publish interceptor statistics.
- *
- * @return true if mbeans should be created for each interceptor
- */
- boolean getExposeManagementStatistics();
-
- void setExposeManagementStatistics(boolean expose);
-
- /**
- * @deprecated use {@link #getExposeManagementStatistics()}
- */
- @Deprecated
- boolean getUseInterceptorMbeans();
-
- /**
- * @deprecated use {@link #setExposeManagementStatistics(boolean)}
- */
- @Deprecated
- void setUseInterceptorMbeans(boolean expose);
-
- /**
- * Get the cluster properties (e.g. the protocol stack specification in case of JGroups)
- */
- String getClusterProperties();
-
- /**
- * Set the cluster properties. If the cache is to use the new properties, it has to be redeployed
- *
- * @param cluster_props The properties for the cluster (JGroups)
- */
- void setClusterProperties(String cluster_props);
-
- /**
- * Retrieves the cache loader configuration element
- *
- * @return whatever was passed to {@link #setCacheLoaderConfig(Element)}
- * or <code>null</code> if nothing was
- */
- Element getCacheLoaderConfig();
-
- void setCacheLoaderConfig(Element cacheLoaderConfig);
-
- /**
- * @deprecated use {@link #getCacheLoaderConfig()}
- */
- @Deprecated
- Element getCacheLoaderConfiguration();
-
- /**
- * @deprecated use {@link #setCacheLoaderConfig(org.w3c.dom.Element)}
- */
- @Deprecated
- void setCacheLoaderConfiguration(Element cache_loader_config);
-
- boolean getSyncCommitPhase();
-
- void setSyncCommitPhase(boolean sync_commit_phase);
-
- boolean getSyncRollbackPhase();
-
- void setSyncRollbackPhase(boolean sync_rollback_phase);
-
- /**
- * @return whatever was passed to {@link #setEvictionPolicyConfig(Element)}
- * or <code>null</code> if nothing was
- */
- Element getEvictionPolicyConfig();
-
- /**
- * Setup eviction policy configuration
- */
- void setEvictionPolicyConfig(Element config);
-
- /**
- * Gets the JGroups protocol stack config in W3C DOM Element form.
- *
- * @return the protocol stack, or <code>null</code> if it was not
- * set via {@link #setClusterConfig(Element)}
- */
- Element getClusterConfig();
-
- /**
- * Convert a list of elements to the JG property string
- */
- void setClusterConfig(Element config);
-
- /**
- * Get the max time to wait until the initial state is retrieved. This is used in a replicating cache: when a new cache joins the cluster, it needs to acquire the (replicated) state of the other members to initialize itself. If no state has been received within <tt>timeout</tt> milliseconds, the map will be empty.
- *
- * @return long Number of milliseconds to wait for the state. 0 means to wait forever.
- * @deprecated use {@link #getStateRetrievalTimeout()}
- */
- @Deprecated
- long getInitialStateRetrievalTimeout();
-
- /**
- * Get the max time to wait until the state is retrieved. This is used in a replicating cache: when a new cache joins the cluster, it needs to acquire the (replicated) state of the other members to initialize itself. If no state has been received within <tt>timeout</tt> milliseconds, the map will be empty.
- *
- * @return long Number of milliseconds to wait for the state. 0 means to wait forever.
- */
- long getStateRetrievalTimeout();
-
- /**
- * Set the initial state transfer timeout (see {@link #getInitialStateRetrievalTimeout()})
- *
- * @deprecated use {@link #setStateRetrievalTimeout(long)}
- */
- @Deprecated
- void setInitialStateRetrievalTimeout(long timeout);
-
- /**
- * Set the state transfer timeout (see {@link #getStateRetrievalTimeout()})
- */
- void setStateRetrievalTimeout(long timeout);
-
- /**
- * Returns the current caching mode. Valid values are <ul> <li>LOCAL <li>REPL_ASYNC <li>REPL_SYNC <ul>
- *
- * @return String The caching mode
- */
- String getCacheMode();
-
- /**
- * Sets the default caching mode)
- */
- void setCacheMode(String mode) throws Exception;
-
- /**
- * Returns the default max timeout after which synchronous replication calls return.
- *
- * @return long Number of milliseconds after which a sync repl call must return. 0 means to wait forever
- */
- long getSyncReplTimeout();
-
- /**
- * Sets the default maximum wait time for synchronous replication to receive all results
- */
- void setSyncReplTimeout(long timeout);
-
- boolean getUseReplQueue();
-
- void setUseReplQueue(boolean flag);
-
- long getReplQueueInterval();
-
- void setReplQueueInterval(long interval);
-
- int getReplQueueMaxElements();
-
- void setReplQueueMaxElements(int max_elements);
-
- /**
- * Returns the transaction isolation level.
- */
- String getIsolationLevel();
-
- /**
- * Set the transaction isolation level. This determines the locking strategy to be used
- */
- void setIsolationLevel(String level);
-
- /**
- * Returns whether or not any initial state transfer or subsequent partial
- * state transfer following an <code>activateRegion</code> call should
- * include in-memory state. Allows for warm/hot caches (true/false). The
- * characteristics of a state transfer can be further defined by a cache
- * loader's FetchPersistentState property.
- */
- boolean getFetchInMemoryState();
-
- /**
- * Sets whether or not any initial or subsequent partial state transfer
- * should include in-memory state.
- */
- void setFetchInMemoryState(boolean flag);
-
- /**
- * Gets the format version of the data transferred during an initial state
- * transfer or a call to {@link Region#activate()}. Different
- * releases of JBossCache may format this data differently; this property
- * identifies the format version being used by this cache instance.
- * <p/>
- * The default value for this property is
- * {@link org.jboss.cache.config.Configuration#DEFAULT_REPLICATION_VERSION}.
- * </p>
- *
- * @return a short identifying JBossCache release; e.g. <code>124</code>
- * for JBossCache 1.2.4
- */
- String getReplicationVersion();
-
- /**
- * Sets the format version of the data transferred during an initial state
- * transfer or a call to {@link Region#activate()}. Different
- * releases of JBossCache may format this data differently; this property
- * identifies the format version being used by this cache instance. Setting
- * this property to a value other than the default allows a cache instance
- * from a later release to interoperate with a cache instance from an
- * earlier release.
- *
- * @param version a short identifying JBossCache release;
- * e.g. <code>124</code> for JBossCache 1.2.4
- */
- void setReplicationVersion(String version);
-
- /**
- * Default max time to wait for a lock. If the lock cannot be acquired within this time, a LockingException will be thrown.
- *
- * @return long Max number of milliseconds to wait for a lock to be acquired
- */
- long getLockAcquisitionTimeout();
-
- /**
- * Set the max time for lock acquisition. A value of 0 means to wait forever (not recomended). Note that lock acquisition timeouts may be removed in the future when we have deadlock detection.
- *
- * @param timeout
- */
- void setLockAcquisitionTimeout(long timeout);
-
- String getTransactionManagerLookupClass();
-
- /**
- * Sets the class of the TransactionManagerLookup impl. This will attempt to create an instance, and will throw an exception if this fails.
- *
- * @param cl
- * @throws Exception
- */
- void setTransactionManagerLookupClass(String cl) throws Exception;
-
- TransactionManager getTransactionManager();
-
- void setTransactionManager(TransactionManager manager);
-
- /**
- * Gets whether the entire tree is inactive upon startup, only responding
- * to replication messages after activateRegion is
- * called to activate one or more parts of the tree.
- * <p/>
- * This property is only relevant if {@link org.jboss.cache.config.Configuration#isUseRegionBasedMarshalling()} is
- * <code>true</code>.
- */
- boolean isInactiveOnStartup();
-
- /**
- * Sets whether the entire tree is inactive upon startup, only responding
- * to replication messages after {@link Region#activate()} is
- * called to activate one or more parts of the tree.
- * <p/>
- * This property is only relevant if {@link org.jboss.cache.config.Configuration#isUseRegionBasedMarshalling()} is
- * <code>true</code>.
- */
- void setInactiveOnStartup(boolean inactiveOnStartup);
-
- /**
- * Sets the buddy replication configuration element
- *
- * @param config
- */
- void setBuddyReplicationConfig(Element config);
-
- /**
- * Retrieves the buddy replication configuration element
- *
- * @return whatever was passed to {@link #setBuddyReplicationConfig(Element)}
- * or <code>null</code> if nothing was
- */
- Element getBuddyReplicationConfig();
-
- /**
- * Retrieves the JGroups multiplexer stack name if defined.
- *
- * @return the multiplexer stack name
- */
- String getMultiplexerStack();
-
- /**
- * Used with JGroups multiplexer, specifies stack to be used (e.g., fc-fast-minimalthreads)
- * This attribute is optional; if not provided, a default multiplexer stack will be used.
- *
- * @param stackName the name of the multiplexer stack
- */
- void setMultiplexerStack(String stackName);
-
- ChannelFactory getMuxChannelFactory();
-
- void setMuxChannelFactory(ChannelFactory factory);
-
- JChannelFactoryMBean getMultiplexerService();
-
- void setMultiplexerService(JChannelFactoryMBean muxService);
-
-}
\ No newline at end of file
Modified: core/branches/flat/src/main/java/org/horizon/jmx/PlatformMBeanServerRegistration.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/PlatformMBeanServerRegistration.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/PlatformMBeanServerRegistration.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx;
+package org.horizon.jmx;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
/**
- * If {@link org.jboss.cache.config.Configuration#getExposeManagementStatistics()} is true, then class will register
+ * If {@link Configuration#getExposeManagementStatistics()} is true, then class will register
* all the MBeans from the ConfigurationRegistry to the pltform MBean server.
* <p/>
* Note: to enable platform MBeanServer the following system property should be passet to the JVM:
Modified: core/branches/flat/src/main/java/org/horizon/jmx/ResourceDMBean.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/ResourceDMBean.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/ResourceDMBean.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx;
+package org.horizon.jmx;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.jmx.annotations.MBean;
-import org.jboss.cache.jmx.annotations.ManagedAttribute;
-import org.jboss.cache.jmx.annotations.ManagedOperation;
+import org.horizon.jmx.annotations.MBean;
+import org.horizon.jmx.annotations.ManagedAttribute;
+import org.horizon.jmx.annotations.ManagedOperation;
import javax.management.Attribute;
import javax.management.AttributeList;
Modified: core/branches/flat/src/main/java/org/horizon/jmx/annotations/MBean.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/annotations/MBean.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/annotations/MBean.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx.annotations;
+package org.horizon.jmx.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
@@ -30,7 +30,7 @@
/**
* Classes anotaded with this will be exposed as MBeans.
* If you are looking for more fined grained way of exposing jmx attributes/operations, take a look at
- * {@link org.jboss.cache.jmx.annotations.ManagedAttribute} and {@link org.jboss.cache.jmx.annotations.ManagedOperation}
+ * {@link org.horizon.jmx.annotations.ManagedAttribute} and {@link org.horizon.jmx.annotations.ManagedOperation}
*
* @author Mircea.Markus at jboss.com
* @since 3.0
Modified: core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedAttribute.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/annotations/ManagedAttribute.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedAttribute.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx.annotations;
+package org.horizon.jmx.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Modified: core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedOperation.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/cache/jmx/annotations/ManagedOperation.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/jmx/annotations/ManagedOperation.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.cache.jmx.annotations;
+package org.horizon.jmx.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Copied: core/branches/flat/src/main/java/org/horizon/lifecycle (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/lifecycle)
Modified: core/branches/flat/src/main/java/org/horizon/lifecycle/Lifecycle.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/lifecycle/Lifecycle.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/lifecycle/Lifecycle.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.lifecycle;
+package org.horizon.lifecycle;
/**
* // TODO: MANIK: Document this
Copied: core/branches/flat/src/main/java/org/horizon/loader (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/loader)
Modified: core/branches/flat/src/main/java/org/horizon/loader/AbstractCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/AbstractCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/AbstractCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,28 +19,26 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.marshall.EntryData;
+import org.horizon.marshall.EntryDataExceptionMarker;
+import org.horizon.marshall.EntryDataMarker;
+import org.horizon.marshall.Marshaller;
+
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.marshall.EntryData;
-import org.jboss.starobrno.marshall.EntryDataExceptionMarker;
-import org.jboss.starobrno.marshall.EntryDataMarker;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-
/**
* A convenience abstract implementation of a {@link CacheLoader}. Specific methods to note are methods like
- * {@link #storeState(org.jboss.cache.Fqn,java.io.ObjectInputStream)}, {@link #loadState(org.jboss.cache.Fqn,java.io.ObjectOutputStream)},
+ * {@link #storeState(Fqn,java.io.ObjectInputStream)}, {@link #loadState(Fqn,java.io.ObjectOutputStream)},
* {@link #storeEntireState(java.io.ObjectInputStream)} and {@link #loadEntireState(java.io.ObjectOutputStream)} which have convenience
* implementations here.
* <p/>
@@ -54,10 +52,8 @@
public abstract class AbstractCacheLoader<K, V> implements CacheLoader<K,V>
{
protected CacheSPI<K,V> cache;
- protected RegionManager regionManager;
private static final Log log = LogFactory.getLog(AbstractCacheLoader.class);
private static final boolean trace = log.isTraceEnabled();
- protected BuddyFqnTransformer buddyFqnTransformer = new BuddyFqnTransformer();
/**
* HashMap<Object,List<Modification>>. List of open transactions. Note that this is purely transient, as
* we don't use a log, recovery is not available
@@ -138,7 +134,7 @@
}
}
- protected ExtendedMarshaller getMarshaller()
+ protected Marshaller getMarshaller()
{
return cache.getMarshaller();
}
Modified: core/branches/flat/src/main/java/org/horizon/loader/AbstractDelegatingCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/AbstractDelegatingCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/AbstractDelegatingCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.List;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.marshall.EntryData;
+import org.horizon.CacheSPI;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.marshall.EntryData;
/**
* AbstractDelegatingCacheLoader provides standard functionality for a cache loader that simply delegates each
Modified: core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/AsyncCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.CacheException;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import java.util.ArrayList;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoaderConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/AsyncCacheLoaderConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/AsyncCacheLoaderConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import java.util.Properties;
Modified: core/branches/flat/src/main/java/org/horizon/loader/CacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/CacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/CacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import net.jcip.annotations.ThreadSafe;
-import org.jboss.cache.loader.AbstractCacheLoader;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-import org.jboss.starobrno.marshall.EntryData;
+import org.horizon.CacheSPI;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+import org.horizon.marshall.EntryData;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -35,30 +34,27 @@
import java.util.Map;
/**
- * A {@link org.jboss.cache.loader.CacheLoader} implementation persists and load keys to and from
+ * A {@link CacheLoader} implementation persists and load keys to and from
* secondary storage, such as a database or filesystem. Typically,
* implementations store a series of keys and values (an entire {@link Map})
* under a single {@link Fqn}. Loading and saving properties of an entire
* {@link Map} should be atomic.
* <p/>
* Lifecycle: First an instance of the loader is created, then the
- * configuration ({@link #setConfig(org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig)}) and cache ({@link
- * #setCache(org.jboss.cache.CacheSPI_Legacy)}) are set. After this, {@link #create()} is called.
+ * configuration ({@link #setConfig(CacheLoaderConfig.IndividualCacheLoaderConfig)}) and cache ({@link
+ * #setCache(CacheSPI)}) are set. After this, {@link #create()} is called.
* Then {@link #start()} is called. When re-deployed, {@link #stop()} will be
* called, followed by another {@link #start()}. Finally, when shut down,
* {@link #destroy()} is called, after which the loader is unusable.
* <p/>
- * An {@link org.jboss.cache.loader.AbstractCacheLoader} is provided as a convenient starting place
- * when implementing your own {@link org.jboss.cache.loader.CacheLoader}.
+ * An {@link AbstractCacheLoader} is provided as a convenient starting place
+ * when implementing your own {@link CacheLoader}.
* <p/>
* It is important to note that all implementations are thread safe, as concurrent reads and writes, potentially even to
* the same {@link Fqn}, are possible.
* <p/>
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
- * @see org.jboss.cache.CacheSPI_Legacy
- * @see org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig
- * @see org.jboss.cache.loader.AbstractCacheLoader
* @since 2.0.0
*/
@ThreadSafe
@@ -68,11 +64,11 @@
/**
* Sets the configuration. This is called before {@link #create()} and {@link #start()}.
*
- * @param config May be an instance of the {@link org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig} base
+ * @param config May be an instance of the {@link CacheLoaderConfig.IndividualCacheLoaderConfig} base
* class, in which case the cache loader should use the
- * {@link org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig#getProperties()}
+ * {@link CacheLoaderConfig.IndividualCacheLoaderConfig#getProperties()}
* method to find configuration information. Alternatively,
- * may be a type-specific subclass of {@link org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig},
+ * may be a type-specific subclass of {@link CacheLoaderConfig.IndividualCacheLoaderConfig},
* if there is one.
*/
void setConfig(IndividualCacheLoaderConfig config);
@@ -80,13 +76,13 @@
/**
* Gets the configuration.
*
- * @return the configuration, represented by a {@link org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig} object.
+ * @return the configuration, represented by a {@link CacheLoaderConfig.IndividualCacheLoaderConfig} object.
*/
IndividualCacheLoaderConfig getConfig();
/**
- * Sets the {@link org.jboss.cache.CacheSPI_Legacy} that is maintaining this CacheLoader.
- * This method allows this CacheLoader to set a reference to the {@link org.jboss.cache.CacheSPI_Legacy}.
+ * Sets the {@link CacheSPI} that is maintaining this CacheLoader.
+ * This method allows this CacheLoader to set a reference to the {@link CacheSPI}.
* This method is called be called after the CacheLoader instance has been constructed.
*
* @param c The cache on which this loader works
@@ -94,7 +90,7 @@
void setCache(CacheSPI<K, V> c);
/**
- * Returns all keys and values from the persistent store, given a {@link org.jboss.cache.Fqn}
+ * Returns all keys and values from the persistent store, given a {@link Fqn}
*
* @param name the {@link Fqn} to search for.
* @return Map<Object,Object> keys and values for the given node. Returns
@@ -158,7 +154,7 @@
* logic, attempting to write data to a temp location (or memory) and writing it to the proper location upon commit.
*
* @param tx The transaction, indended to be used by implementations as an identifier of the transaction (and not necessarily a JTA {@link javax.transaction.Transaction} object)
- * @param modifications A {@link List} containing {@link org.jboss.cache.Modification}s, for the given transaction
+ * @param modifications A {@link List} containing {@link org.horizon.loader.Modification}s, for the given transaction
* @param one_phase Persist immediately and (for example) commit the local JDBC transaction as well. When true,
* we won't get a {@link #commit(Object)} or {@link #rollback(Object)} method call later
* @throws Exception
@@ -205,7 +201,7 @@
*
* @param os ObjectOutputStream to write state
* @see AbstractCacheLoader#loadEntireState(ObjectOutputStream)
- * @see org.jboss.starobrno.marshall.NodeData
+ * @see org.horizon.marshall.NodeData
*/
void loadEntireState(ObjectOutputStream os);
@@ -225,7 +221,7 @@
*
* @param is ObjectInputStream to read state
* @see AbstractCacheLoader#storeEntireState(ObjectInputStream)
- * @see org.jboss.starobrno.marshall.NodeData
+ * @see org.horizon.marshall.NodeData
*/
void storeEntireState(ObjectInputStream is);
Modified: core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/CacheLoaderManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/CacheLoaderManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import java.util.ArrayList;
import java.util.Iterator;
@@ -27,22 +27,22 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
-import org.jboss.starobrno.util.ReflectionUtil;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
+import org.horizon.util.ReflectionUtil;
/**
* Manages all cache loader functionality. This class is typically initialised with an XML DOM Element,
- * represeting a cache loader configuration, or a {@link org.jboss.cache.config.CacheLoaderConfig} object.
+ * represeting a cache loader configuration, or a {@link CacheLoaderConfig} object.
* <p/>
* Usage:
* <p/>
@@ -52,26 +52,7 @@
* CacheLoader loader = manager.getCacheLoader();
* </code>
* <p/>
- * The XML configuration passed in would typically look like:
- * <p/>
- * <code><![CDATA[
- * <p/>
- * <config>
- * <passivation>false</passivation>
- * <preload>/</preload>
- * <p/>
- * <cacheloader>
- * <class>org.jboss.cache.loader.FileCacheLoader</class>
- * <async>true</async>
- * <fetchPersistentState>false</fetchPersistentState>
- * <ignoreModifications>false</ignoreModifications>
- * <properties>
- * location=/tmp/file
- * </properties>
- * </cacheloader>
- * </config>
- * ]]>
- * </code>
+ * See the User Guide or sample configuration files for the equivalent XML configuration elements.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
@@ -258,7 +239,7 @@
}
else
{
- throw new Exception("Invalid cache loader configuration!! Singleton store implementation class must extend org.jboss.cache.loader.AbstractDelegatingCacheLoader");
+ throw new Exception("Invalid cache loader configuration!! Singleton store implementation class must extend org.horizon.loader.AbstractDelegatingCacheLoader");
}
}
Modified: core/branches/flat/src/main/java/org/horizon/loader/ChainingCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/ChainingCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/ChainingCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -28,11 +28,11 @@
import java.util.Iterator;
import java.util.List;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.marshall.EntryData;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.marshall.EntryData;
/**
* This decorator is used whenever more than one cache loader is configured. READ operations are directed to
Modified: core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import net.jcip.annotations.ThreadSafe;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.lock.StripedLock;
-import org.jboss.starobrno.marshall.EntryData;
+import org.horizon.CacheException;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.lock.StripedLock;
+import org.horizon.marshall.EntryData;
import org.jboss.util.stream.MarshalledValueInputStream;
import java.io.Closeable;
@@ -60,7 +60,7 @@
* transactional or stressful environment, and its use is restricted to testing.
* <p/>
* In terms of concurrency, file systems are notoriously inconsistent in their implementations of concurrent locks. To get around
- * this and to meet the <b>thread safety</b> contracts set out in {@link CacheLoader}, this implementation uses a {@link org.jboss.cache.lock.StripedLock}
+ * this and to meet the <b>thread safety</b> contracts set out in {@link CacheLoader}, this implementation uses a {@link StripedLock}
*
* @author Bela Ban
* @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
Modified: core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoaderConfig.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/FileCacheLoaderConfig.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/FileCacheLoaderConfig.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
-import org.jboss.starobrno.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
-import org.jboss.starobrno.config.Dynamic;
+import org.horizon.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.horizon.config.Dynamic;
import java.util.Properties;
-import org.jboss.starobrno.util.Util;
+import org.horizon.util.Util;
public class FileCacheLoaderConfig extends IndividualCacheLoaderConfig
{
Modified: core/branches/flat/src/main/java/org/horizon/loader/Modification.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/Modification.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/Modification.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import java.io.Serializable;
Modified: core/branches/flat/src/main/java/org/horizon/loader/ReadOnlyDelegatingCacheLoader.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/loader/ReadOnlyDelegatingCacheLoader.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/loader/ReadOnlyDelegatingCacheLoader.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.loader;
+package org.horizon.loader;
import java.io.ObjectInputStream;
import java.util.List;
Copied: core/branches/flat/src/main/java/org/horizon/lock (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/lock)
Copied: core/branches/flat/src/main/java/org/horizon/lock/LockContainerHashingTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/lock/LockContainerHashingTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/lock/LockContainerHashingTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/lock/LockContainerHashingTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon.lock;
+
+import org.horizon.util.concurrent.locks.LockContainer;
+import org.horizon.util.concurrent.locks.ReentrantLockContainer;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.*;
+import java.util.concurrent.locks.Lock;
+
+ at Test(groups = "unit")
+public class LockContainerHashingTest
+{
+ private LockContainer<String> stripedLock;
+
+ @BeforeMethod(alwaysRun = true)
+ public void setUp()
+ {
+ stripedLock = new ReentrantLockContainer<String>(500);
+ }
+
+ public void testHashingDistribution()
+ {
+ // ensure even bucket distribution of lock stripes
+ List<String> keys = createRandomKeys(1000);
+
+ Map<Lock, Integer> distribution = new HashMap<Lock, Integer>();
+
+ for (String s : keys)
+ {
+ Lock lock = stripedLock.getLock(s);
+ if (distribution.containsKey(lock))
+ {
+ int count = distribution.get(lock) + 1;
+ distribution.put(lock, count);
+ }
+ else
+ {
+ distribution.put(lock, 1);
+ }
+ }
+
+ System.out.println(distribution);
+
+ // cannot be larger than the number of locks
+ System.out.println("dist size: " + distribution.size());
+ System.out.println("num shared locks: " + stripedLock.size());
+ assert distribution.size() <= stripedLock.size();
+ // assume at least a 2/3rd spread
+ assert distribution.size() * 1.5 >= stripedLock.size();
+ }
+
+ private List<String> createRandomKeys(int number)
+ {
+
+ List<String> f = new ArrayList<String>(number);
+ Random r = new Random();
+ int i = number;
+ while (f.size() < number)
+ {
+ String s = i + "baseKey" + (10000 + i++);
+ f.add(s);
+ }
+
+ return f;
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/lock/LockContainerHashingTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/lock/LockManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/lock/LockManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/lock/LockManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.lock;
+package org.horizon.lock;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.context.InvocationContext;
/**
* An interface to deal with all aspects of acquiring and releasing locks for nodes in the cache.
@@ -32,7 +32,7 @@
public interface LockManager
{
/**
- * Determines the owner to be used when obtaining locks, given an invocation context. This is typically a {@link org.jboss.cache.transaction.GlobalTransaction} if one
+ * Determines the owner to be used when obtaining locks, given an invocation context. This is typically a {@link org.horizon.transaction.GlobalTransaction} if one
* is present in the context, or {@link Thread#currentThread()} if one is not present.
*
* @param ctx invocation context
@@ -42,12 +42,12 @@
/**
* Acquires a lock of type lockType, for a given owner, on a specific Node in the cache, denoted by fqn. This
- * method will try for {@link org.jboss.cache.config.Configuration#getLockAcquisitionTimeout()} milliseconds and give up if it is unable to acquire the required lock.
+ * method will try for {@link org.horizon.config.Configuration#getLockAcquisitionTimeout()} milliseconds and give up if it is unable to acquire the required lock.
*
- * @param fqn Fqn to lock
- * @param lockType type of lock to acquire
- * @param owner owner to acquire the lock for
+ * @param key key to lock
+ * @param owner owner to acquire the lock for
* @return true if the lock was acquired, false otherwise.
+ * @throws InterruptedException
*/
boolean lock(Object key, Object owner) throws InterruptedException;
@@ -55,36 +55,35 @@
* Acquires a lock of type lockType, for a given owner, on a specific Node in the cache, denoted by fqn. This
* method will try for timeout milliseconds and give up if it is unable to acquire the required lock.
*
- * @param fqn Fqn to lock
- * @param lockType type of lock to acquire
- * @param owner owner to acquire the lock for
- * @param timeout maximum length of time to wait for (in millis)
+ * @param key key to lock
+ * @param owner owner to acquire the lock for
+ * @param timeout maximum length of time to wait for (in millis)
* @return true if the lock was acquired, false otherwise.
+ * @throws InterruptedException if interrupted
*/
boolean lock(Object key, Object owner, long timeout) throws InterruptedException;
/**
* Acquires a lock of type lockType, on a specific Node in the cache, denoted by fqn. This
* method will try for a period of time and give up if it is unable to acquire the required lock. The period of time
- * is specified in {@link org.jboss.cache.config.Option#getLockAcquisitionTimeout()} and, if this is unset, the default timeout
- * set in {@link org.jboss.cache.config.Configuration#getLockAcquisitionTimeout()} is used.
+ * is specified in {@link org.horizon.config.Option#getLockAcquisitionTimeout()} and, if this is unset, the default timeout
+ * set in {@link org.horizon.config.Configuration#getLockAcquisitionTimeout()} is used.
* <p/>
- * In addition, any locks acquired are added to the context OR transaction entry using {@link org.jboss.cache.InvocationContext#addLock(Object)}.
+ * In addition, any locks acquired are added to the context OR transaction entry using {@link InvocationContext#addLock(Object)}.
* <p/>
- * The owner for the lock is determined by passing the invocation context to {@link #getLockOwner(org.jboss.cache.InvocationContext)}.
+ * The owner for the lock is determined by passing the invocation context to {@link #getLockOwner(InvocationContext)}.
* <p/>
*
- * @param fqn Fqn to lock
- * @param lockType type of lock to acquire
- * @param ctx invocation context associated with this invocation
+ * @param key key to lock
+ * @param ctx invocation context associated with this invocation
* @return true if the lock was acquired, false otherwise.
+ * @throws InterruptedException if interrupted
*/
boolean lockAndRecord(Object key, InvocationContext ctx) throws InterruptedException;
/**
* Releases the lock passed in, held by the specified owner
*
- * @param fqn Fqn of the node to unlock
* @param owner lock owner
*/
void unlock(Object key, Object owner);
@@ -94,7 +93,7 @@
* <p/>
* Locks are released in reverse order of which they are acquired and registered.
* <p/>
- * Lock owner is determined by passing the invocation context to {@link #getLockOwner(org.jboss.cache.InvocationContext)}
+ * Lock owner is determined by passing the invocation context to {@link #getLockOwner(InvocationContext)}
* <p/>
*
* @param ctx invocation context to inspect
@@ -104,9 +103,7 @@
/**
* Tests whether a given owner owns a lock of lockType on a particular Fqn.
*
- * @param fqn fqn to test
- * @param lockType type of lock to test for
- * @param owner owner
+ * @param owner owner
* @return true if the owner does own the specified lock type on the specified node, false otherwise.
*/
boolean ownsLock(Object key, Object owner);
@@ -114,7 +111,6 @@
/**
* Returns true if the node is locked (either for reading or writing) by anyone, and false otherwise.
*
- * @param n node to inspect
* @return true of locked; false if not.
*/
boolean isLocked(Object key);
@@ -122,7 +118,6 @@
/**
* Retrieves the write lock owner, if any, for the current Fqn.
*
- * @param f Fqn to inspect
* @return the owner of the lock, or null if not locked.
*/
Object getOwner(Object key);
Modified: core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/lock/StripedLock.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/lock/StripedLock.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.lock;
+package org.horizon.lock;
import net.jcip.annotations.ThreadSafe;
@@ -28,9 +28,9 @@
/**
* A simple implementation of lock striping, using Fqns as the keys to lock on, primarily used to help make
- * {@link org.jboss.cache.loader.CacheLoader} implemtations thread safe.
+ * {@link org.horizon.loader.CacheLoader} implemtations thread safe.
* <p/>
- * Backed by a set of {@link java.util.concurrent.locks.ReentrantReadWriteLock} instances, and using the {@link org.jboss.cache.Fqn}
+ * Backed by a set of {@link java.util.concurrent.locks.ReentrantReadWriteLock} instances, and using the key
* hashcodes to determine buckets.
* <p/>
* Since buckets are used, it doesn't matter that the Fqn in question is not removed from the lock map when no longer in
@@ -82,7 +82,6 @@
/**
* Blocks until a lock is acquired.
*
- * @param fqn the Fqn to lock on
* @param exclusive if true, a write (exclusive) lock is attempted, otherwise a read (shared) lock is used.
*/
public void acquireLock(Object key, boolean exclusive)
@@ -102,7 +101,6 @@
/**
* Releases a lock the caller may be holding. This method is idempotent.
*
- * @param fqn the Fqn to release
*/
public void releaseLock(Object key)
{
@@ -143,10 +141,8 @@
}
/**
- * Releases locks on all fqns passed in. Makes multiple calls to {@link #releaseLock(org.jboss.cache.Fqn)}. This method is idempotent.
+ * Releases locks on all fqns passed in. Makes multiple calls to {@link #releaseLock(Object)}. This method is idempotent.
*
- * @param fqns list of fqns
- * @see #releaseLock(org.jboss.cache.Fqn)
*/
public void releaseAllLocks(List<Object> keys)
{
@@ -154,11 +150,9 @@
}
/**
- * Acquires locks on all fqns passed in. Makes multiple calls to {@link #acquireLock(org.jboss.cache.Fqn,boolean)}
+ * Acquires locks on all fqns passed in. Makes multiple calls to {@link #acquireLock(Object, boolean)}
*
- * @param fqns list of fqns
* @param exclusive whether locks are exclusive.
- * @see #acquireLock(org.jboss.cache.Fqn,boolean)
*/
public void acquireAllLocks(List<Object> keys, boolean exclusive)
{
Modified: core/branches/flat/src/main/java/org/horizon/lock/StripedLockManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/lock/StripedLockManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/lock/StripedLockManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.lock;
+package org.horizon.lock;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.util.concurrent.locks.LockContainer;
-import org.jboss.starobrno.util.concurrent.locks.OwnableReentrantLock;
-import org.jboss.starobrno.util.concurrent.locks.OwnableReentrantLockContainer;
-import org.jboss.starobrno.util.concurrent.locks.ReentrantLockContainer;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
+import org.horizon.util.concurrent.locks.LockContainer;
+import org.horizon.util.concurrent.locks.OwnableReentrantLock;
+import org.horizon.util.concurrent.locks.OwnableReentrantLockContainer;
+import org.horizon.util.concurrent.locks.ReentrantLockContainer;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.invocation.InvocationContextContainer;
import javax.transaction.TransactionManager;
import java.util.List;
Modified: core/branches/flat/src/main/java/org/horizon/lock/TimeoutException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/lock/TimeoutException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/lock/TimeoutException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.lock;
+package org.horizon.lock;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
/**
Copied: core/branches/flat/src/main/java/org/horizon/manager (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/manager)
Modified: core/branches/flat/src/main/java/org/horizon/manager/CacheManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/manager/CacheManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.manager;
+package org.horizon.manager;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.GlobalConfiguration;
-import org.jboss.starobrno.config.parsing.XmlConfigurationParser;
-import org.jboss.starobrno.config.parsing.XmlConfigurationParserImpl;
-import org.jboss.starobrno.factories.DefaultCacheFactory;
-import org.jboss.starobrno.factories.GlobalComponentRegistry;
-import org.jboss.starobrno.lifecycle.Lifecycle;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.GlobalConfiguration;
+import org.horizon.config.parsing.XmlConfigurationParser;
+import org.horizon.config.parsing.XmlConfigurationParserImpl;
+import org.horizon.factories.DefaultCacheFactory;
+import org.horizon.factories.GlobalComponentRegistry;
+import org.horizon.lifecycle.Lifecycle;
import java.io.IOException;
import java.io.InputStream;
@@ -47,7 +47,7 @@
* finite number of instances).
* <p/>
* Constructing a <tt>CacheManager</tt> is done via one of its constructors, which optionally take in a
- * {@link org.jboss.starobrno.config.Configuration} or a path or URL to a configuration XML file.
+ * {@link org.horizon.config.Configuration} or a path or URL to a configuration XML file.
* <p/>
* Lifecycle - <tt>CacheManager</tt>s have a lifecycle (it implements {@link Lifecycle}) and the default constructors also
* call {@link #start()}. Overloaded versions of the constructors are available, that do not start the <tt>CacheManager</tt>,
@@ -108,7 +108,7 @@
/**
* Constructs and starts a new instance of the CacheManager, using the default configuration passed in. Uses
- * defaults for a {@link org.jboss.starobrno.config.GlobalConfiguration}.
+ * defaults for a {@link org.horizon.config.GlobalConfiguration}.
*
* @param defaultConfiguration configuration to use as a template for all caches created
*/
@@ -119,7 +119,7 @@
/**
* Constructs a new instance of the CacheManager, using the default configuration passed in. Uses
- * defaults for a {@link org.jboss.starobrno.config.GlobalConfiguration}.
+ * defaults for a {@link org.horizon.config.GlobalConfiguration}.
*
* @param defaultConfiguration configuration file to use as a template for all caches created
* @param start if true, the cache manager is started
@@ -283,7 +283,7 @@
* <p/>
* When creating a new cache, this method will use the configuration passed in to the CacheManager on construction,
* as a template, and then optionally apply any overrides previously defined for the named cache using the
- * {@link #defineCache(String, org.jboss.starobrno.config.Configuration)} method, or declared in the configuration file.
+ * {@link #defineCache(String, org.horizon.config.Configuration)} method, or declared in the configuration file.
*
* @param cacheName name of cache to retrieve
* @return a cache instance identified by cacheName
Copied: core/branches/flat/src/main/java/org/horizon/manager/CacheManagerComponentRegistryTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/manager/CacheManagerComponentRegistryTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/manager/CacheManagerComponentRegistryTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/manager/CacheManagerComponentRegistryTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,102 @@
+package org.horizon.manager;
+
+import org.horizon.Cache;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.Configuration;
+import org.horizon.interceptors.BatchingInterceptor;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.loader.FileCacheLoaderConfig;
+import org.horizon.remoting.RPCManager;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+
+import javax.transaction.TransactionManager;
+
+/**
+ * @author Manik Surtani
+ */
+ at Test(groups = "functional", sequential = true)
+public class CacheManagerComponentRegistryTest
+{
+ CacheManager cm;
+
+ @AfterMethod
+ public void tearDown()
+ {
+ if (cm != null) cm.stop();
+ }
+
+ public void testForceSharedComponents() throws CacheNameExistsException, NamedCacheNotFoundException
+ {
+ Configuration defaultCfg = new Configuration();
+ defaultCfg.setCacheMode(Configuration.CacheMode.REPL_SYNC);
+ // cache manager with default configuration
+ cm = new CacheManager(defaultCfg);
+
+ // default cache with no overrides
+ Cache c = cm.getCache();
+
+ Configuration overrides = new Configuration();
+ overrides.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ cm.defineCache("transactional", overrides);
+ Cache transactional = cm.getCache("transactional");
+
+ // assert components.
+ assert TestingUtil.extractComponent(c, TransactionManager.class) == null;
+ assert TestingUtil.extractComponent(transactional, TransactionManager.class) instanceof DummyTransactionManager;
+
+ // assert force-shared components
+ assert TestingUtil.extractComponent(c, RPCManager.class) != null;
+ assert TestingUtil.extractComponent(transactional, RPCManager.class) != null;
+ assert TestingUtil.extractComponent(c, RPCManager.class) == TestingUtil.extractComponent(transactional, RPCManager.class);
+ }
+
+ public void testForceUnsharedComponents() throws CacheNameExistsException, NamedCacheNotFoundException
+ {
+ CacheLoaderConfig clc = new CacheLoaderConfig();
+ FileCacheLoaderConfig fc = new FileCacheLoaderConfig();
+ fc.setLocation("/tmp");
+ clc.addIndividualCacheLoaderConfig(fc);
+
+ Configuration defaultCfg = new Configuration();
+ defaultCfg.setCacheMode(Configuration.CacheMode.REPL_SYNC);
+ defaultCfg.setCacheLoaderConfig(clc);
+ // cache manager with default configuration
+ cm = new CacheManager(defaultCfg);
+
+ // default cache with no overrides
+ Cache c = cm.getCache();
+
+ Configuration overrides = new Configuration();
+ overrides.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
+ cm.defineCache("transactional", overrides);
+ Cache transactional = cm.getCache("transactional");
+
+ // assert components.
+ assert TestingUtil.extractComponent(c, CacheLoaderManager.class) != null;
+ assert TestingUtil.extractComponent(transactional, CacheLoaderManager.class) != null;
+ assert TestingUtil.extractComponent(c, CacheLoaderManager.class) != TestingUtil.extractComponent(transactional, CacheLoaderManager.class);
+ }
+
+ public void testOverridingComponents() throws CacheNameExistsException, NamedCacheNotFoundException
+ {
+ Configuration defaultCfg = new Configuration();
+ cm = new CacheManager(defaultCfg);
+
+ // default cache with no overrides
+ Cache c = cm.getCache();
+
+ Configuration overrides = new Configuration();
+ overrides.setInvocationBatchingEnabled(true);
+ cm.defineCache("overridden", overrides);
+ Cache overridden = cm.getCache("overridden");
+
+ // assert components.
+ assert !TestingUtil.extractComponent(c, InterceptorChain.class).containsInterceptorType(BatchingInterceptor.class);
+ assert TestingUtil.extractComponent(overridden, InterceptorChain.class).containsInterceptorType(BatchingInterceptor.class);
+ }
+}
Copied: core/branches/flat/src/main/java/org/horizon/manager/CacheManagerTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/manager/CacheManagerTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/manager/CacheManagerTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/manager/CacheManagerTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,68 @@
+package org.horizon.manager;
+
+import org.horizon.CacheStatus;
+import org.horizon.Cache;
+import org.horizon.config.Configuration;
+import org.testng.annotations.Test;
+
+/**
+ * @author Manik Surtani
+ */
+ at Test(groups = "functional")
+public class CacheManagerTest
+{
+ public void testDefaultCache() throws CacheNameExistsException
+ {
+ CacheManager cm = new CacheManager();
+
+ assert cm.getCache().getCacheStatus() == CacheStatus.STARTED;
+ assert cm.getCache().getName().equals(CacheManager.DEFAULT_CACHE_NAME);
+
+ try
+ {
+ cm.defineCache(CacheManager.DEFAULT_CACHE_NAME, new Configuration());
+ assert false : "Should fail";
+ }
+ catch (IllegalArgumentException e)
+ {
+ // ok
+ assert true : "Allowed";
+ }
+ }
+
+ public void testClashingNames() throws CacheNameExistsException
+ {
+ CacheManager cm = new CacheManager();
+ Configuration c = new Configuration();
+
+ cm.defineCache("aCache", c);
+ try
+ {
+ cm.defineCache("aCache", c);
+ assert false : "Should fail";
+ }
+ catch (CacheNameExistsException cnee)
+ {
+ // expected
+ assert true : "Expected";
+ }
+ }
+
+ public void testStartAndStop()
+ {
+ CacheManager cm = new CacheManager();
+ Cache c1 = cm.getCache("cache1");
+ Cache c2 = cm.getCache("cache2");
+ Cache c3 = cm.getCache("cache3");
+
+ assert c1.getCacheStatus() == CacheStatus.STARTED;
+ assert c2.getCacheStatus() == CacheStatus.STARTED;
+ assert c3.getCacheStatus() == CacheStatus.STARTED;
+
+ cm.stop();
+
+ assert c1.getCacheStatus() == CacheStatus.STOPPED;
+ assert c2.getCacheStatus() == CacheStatus.STOPPED;
+ assert c3.getCacheStatus() == CacheStatus.STOPPED;
+ }
+}
Copied: core/branches/flat/src/main/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/manager/CacheManagerXmlConfigurationTest.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/manager/CacheManagerXmlConfigurationTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,157 @@
+package org.horizon.manager;
+
+import org.horizon.Cache;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+/**
+ * @author Manik Surtani
+ */
+ at Test(groups = "functional", sequential = true)
+public class CacheManagerXmlConfigurationTest
+{
+ CacheManager cm;
+
+ @AfterMethod
+ public void tearDown()
+ {
+ if (cm != null) cm.stop();
+ }
+
+ public void testNamedCacheXML() throws IOException
+ {
+ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<jbosscache xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:jboss:starobrno-core:config:1.0\">\n" +
+ "\n" +
+ " <default>\n" +
+ " <locking concurrencyLevel=\"100\" lockAcquisitionTimeout=\"1000\" />\n" +
+ " </default>\n" +
+ "\n" +
+ " <namedCache name=\"transactional\">\n" +
+ " <transaction transactionManagerLookupClass=\"org.jboss.starobrno.transaction.GenericTransactionManagerLookup\"/>\n" +
+ " </namedCache>\n" +
+ "\n" +
+ " <namedCache name=\"syncRepl\">\n" +
+ " <clustering>\n" +
+ " <stateRetrieval fetchInMemoryState=\"true\" timeout=\"15000\"/>\n" +
+ " <jgroupsConfig configFile=\"udp.xml\"/>\n" +
+ " <sync replTimeout=\"15000\"/>\n" +
+ " </clustering>\n" +
+ " </namedCache>\n" +
+ "\n" +
+ " <namedCache name=\"txSyncRepl\">\n" +
+ " <transaction transactionManagerLookupClass=\"org.jboss.starobrno.transaction.GenericTransactionManagerLookup\"/>\n" +
+ " <clustering>\n" +
+ " <stateRetrieval fetchInMemoryState=\"true\" timeout=\"15000\"/>\n" +
+ " <jgroupsConfig configFile=\"udp.xml\"/>\n" +
+ " <sync replTimeout=\"15000\"/>\n" +
+ " </clustering>\n" +
+ " </namedCache>\n" +
+ " \n" +
+ "</jbosscache>";
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
+ cm = new CacheManager(bais);
+
+ // test default cache
+ Cache c = cm.getCache();
+ assert c.getConfiguration().getConcurrencyLevel() == 100;
+ assert c.getConfiguration().getLockAcquisitionTimeout() == 1000;
+ assert c.getConfiguration().getRuntimeConfig().getTransactionManager() == null;
+ assert c.getConfiguration().getRuntimeConfig().getRPCManager() == null;
+
+ // test the "transactional" cache
+ c = cm.getCache("transactional");
+ assert c.getConfiguration().getConcurrencyLevel() == 100;
+ assert c.getConfiguration().getLockAcquisitionTimeout() == 1000;
+ assert c.getConfiguration().getRuntimeConfig().getTransactionManager() != null;
+ assert c.getConfiguration().getRuntimeConfig().getRPCManager() == null;
+
+ // test the "replicated" cache
+ c = cm.getCache("syncRepl");
+ assert c.getConfiguration().getConcurrencyLevel() == 100;
+ assert c.getConfiguration().getLockAcquisitionTimeout() == 1000;
+ assert c.getConfiguration().getRuntimeConfig().getTransactionManager() == null;
+ assert c.getConfiguration().getRuntimeConfig().getRPCManager() != null;
+
+ // test the "txSyncRepl" cache
+ c = cm.getCache("txSyncRepl");
+ assert c.getConfiguration().getConcurrencyLevel() == 100;
+ assert c.getConfiguration().getLockAcquisitionTimeout() == 1000;
+ assert c.getConfiguration().getRuntimeConfig().getTransactionManager() != null;
+ assert c.getConfiguration().getRuntimeConfig().getRPCManager() != null;
+ }
+
+ public void testNamedCacheXMLClashingNames() throws IOException
+ {
+ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<jbosscache xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:jboss:starobrno-core:config:1.0\">\n" +
+ "\n" +
+ " <default>\n" +
+ " <locking concurrencyLevel=\"100\" lockAcquisitionTimeout=\"1000\" />\n" +
+ " </default>\n" +
+ "\n" +
+ " <namedCache name=\"c1\">\n" +
+ " <transaction transactionManagerLookupClass=\"org.jboss.starobrno.transaction.GenericTransactionManagerLookup\"/>\n" +
+ " </namedCache>\n" +
+ "\n" +
+ " <namedCache name=\"c1\">\n" +
+ " <clustering>\n" +
+ " <stateRetrieval fetchInMemoryState=\"true\" timeout=\"15000\"/>\n" +
+ " <jgroupsConfig configFile=\"udp.xml\"/>\n" +
+ " <sync replTimeout=\"15000\"/>\n" +
+ " </clustering>\n" +
+ " </namedCache>\n" +
+ " \n" +
+ "</jbosscache>";
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
+ try
+ {
+ cm = new CacheManager(bais);
+ assert false : "Should fail";
+ }
+ catch (ConfigurationException expected)
+ {
+
+ }
+ }
+
+ public void testNamedCacheXMLClashingNamesProgrammatic() throws IOException
+ {
+ String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<jbosscache xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:jboss:starobrno-core:config:1.0\">\n" +
+ "\n" +
+ " <default>\n" +
+ " <locking concurrencyLevel=\"100\" lockAcquisitionTimeout=\"1000\" />\n" +
+ " </default>\n" +
+ "\n" +
+ " <namedCache name=\"c1\">\n" +
+ " <transaction transactionManagerLookupClass=\"org.jboss.starobrno.transaction.GenericTransactionManagerLookup\"/>\n" +
+ " </namedCache>\n" +
+ "\n" +
+ "</jbosscache>";
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
+ cm = new CacheManager(bais);
+
+ assert cm.getCache() != null;
+ assert cm.getCache("c1") != null;
+ try
+ {
+ cm.defineCache("c1", new Configuration());
+ assert false : "Should fail";
+ }
+ catch (CacheNameExistsException expected)
+ {
+
+ }
+ }
+}
+
+
Modified: core/branches/flat/src/main/java/org/horizon/manager/CacheNameExistsException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/manager/CacheNameExistsException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/manager/CacheNameExistsException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.manager;
+package org.horizon.manager;
/**
* Thrown if a cache creation is attempted but the name already exists
Modified: core/branches/flat/src/main/java/org/horizon/manager/NamedCacheNotFoundException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/manager/NamedCacheNotFoundException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/manager/NamedCacheNotFoundException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.manager;
+package org.horizon.manager;
/**
* Thrown when a named cache cannot be found.
Copied: core/branches/flat/src/main/java/org/horizon/marshall (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/marshall)
Modified: core/branches/flat/src/main/java/org/horizon/marshall/CacheMarshallerStarobrno.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CacheMarshallerStarobrno.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/CacheMarshallerStarobrno.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,20 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.atomic.DeltaAware;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.io.ByteBuffer;
-import org.jboss.starobrno.io.ExposedByteArrayOutputStream;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.util.FastCopyHashMap;
-import org.jboss.starobrno.util.Immutables;
+import org.horizon.CacheException;
+import org.horizon.atomic.DeltaAware;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.config.Configuration;
+import org.horizon.io.ByteBuffer;
+import org.horizon.io.ExposedByteArrayOutputStream;
+import org.horizon.transaction.GlobalTransaction;
+import org.horizon.util.FastCopyHashMap;
+import org.horizon.util.Immutables;
import org.jboss.util.NotImplementedException;
import org.jboss.util.stream.MarshalledValueInputStream;
import org.jgroups.Address;
@@ -54,7 +54,7 @@
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
*/
-public class CacheMarshallerStarobrno implements ExtendedMarshaller
+public class CacheMarshallerStarobrno implements Marshaller
{
// magic numbers
protected static final int MAGICNUMBER_METHODCALL = 1;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/CommandAwareRpcDispatcher.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/CommandAwareRpcDispatcher.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/CommandAwareRpcDispatcher.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,20 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.VisitableCommand;
-import org.jboss.starobrno.commands.remote.AnnounceBuddyPoolNameCommand;
-import org.jboss.starobrno.commands.remote.AssignToBuddyGroupCommand;
-import org.jboss.starobrno.commands.remote.RemoveFromBuddyGroupCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.interceptors.InterceptorChain;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.util.concurrent.BoundedExecutors;
-import org.jboss.starobrno.util.concurrent.WithinThreadExecutor;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.horizon.commands.remote.AssignToBuddyGroupCommand;
+import org.horizon.commands.remote.RemoveFromBuddyGroupCommand;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.util.concurrent.BoundedExecutors;
+import org.horizon.util.concurrent.WithinThreadExecutor;
import org.jgroups.*;
import org.jgroups.blocks.RpcDispatcher;
import org.jgroups.blocks.RspFilter;
@@ -46,7 +46,7 @@
import java.util.concurrent.atomic.AtomicInteger;
/**
- * A JGroups RPC dispatcher that knows how to deal with {@link org.jboss.cache.commands.ReplicableCommand}s.
+ * A JGroups RPC dispatcher that knows how to deal with {@link ReplicableCommand}s.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @since 2.2.0
@@ -132,7 +132,7 @@
/**
* Similar to {@link #callRemoteMethods(java.util.Vector, org.jgroups.blocks.MethodCall, int, long, boolean, boolean, org.jgroups.blocks.RspFilter)} except that this version
- * is aware of {@link org.jboss.cache.commands.ReplicableCommand} objects.
+ * is aware of {@link ReplicableCommand} objects.
*/
public RspList invokeRemoteCommands(Vector<Address> dests, ReplicableCommand command, int mode, long timeout,
boolean oob, RspFilter filter) throws NotSerializableException, ExecutionException, InterruptedException
Modified: core/branches/flat/src/main/java/org/horizon/marshall/EntryData.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/EntryData.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/EntryData.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import java.io.Externalizable;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/EntryDataExceptionMarker.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/EntryDataExceptionMarker.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/EntryDataExceptionMarker.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import java.io.Externalizable;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/EntryDataMarker.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/EntryDataMarker.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/EntryDataMarker.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import java.io.Serializable;
Deleted: core/branches/flat/src/main/java/org/horizon/marshall/ExtendedMarshaller.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/ExtendedMarshaller.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/ExtendedMarshaller.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.marshall;
-
-import org.jboss.starobrno.io.ByteBuffer;
-import org.jgroups.blocks.RpcDispatcher;
-
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-/**
- * A marshaller is a class that is able to marshall and unmarshall objects efficiently.
- * <p/>
- * The reason why this is implemented specially in JBoss Cache rather than resorting to
- * Java serialization or even the more efficient JBoss serialization is that a lot of efficiency
- * can be gained when a majority of the serialization that occurs has to do with a small set
- * of known types such as {@link org.jboss.cache.Fqn} or {@link org.jboss.cache.commands.ReplicableCommand}, and class type information
- * can be replaced with simple magic numbers.
- * <p/>
- * Unknown types (typically user data) falls back to JBoss serialization.
- * <p/>
- * In addition, using a marshaller allows adding additional data to the byte stream, such as context
- * class loader information on which class loader to use to deserialize the object stream, or versioning
- * information to allow streams to interoperate between different versions of JBoss Cache (see {@link org.jboss.cache.marshall.VersionAwareMarshaller}
- * <p/>
- * This interface implements the JGroups building-block interface {@link org.jgroups.blocks.RpcDispatcher.Marshaller} which
- * is used to marshall {@link org.jboss.cache.commands.ReplicableCommand}s, their parameters and their response values.
- * <p/>
- * The interface is also used by the {@link org.jboss.cache.loader.CacheLoader} framework to efficiently serialize data to be persisted, as well as
- * the {@link org.jboss.starobrno.statetransfer.StateTransferManager} when serializing the cache for transferring state en-masse.
- *
- * @author <a href="mailto://manik@jboss.org">Manik Surtani</a>
- * @since 2.0.0
- */
-public interface ExtendedMarshaller extends RpcDispatcher.Marshaller2
-{
- /**
- * Marshalls an object to a given {@link java.io.ObjectOutputStream}
- *
- * @param obj object to marshall
- * @param out stream to marshall to
- */
- void objectToObjectStream(Object obj, ObjectOutputStream out) throws Exception;
-
- /**
- * Unmarshalls an object from an {@link java.io.ObjectInputStream}
- *
- * @param in stream to unmarshall from
- */
- Object objectFromObjectStream(ObjectInputStream in) throws Exception;
-
- /**
- * Unmarshalls an object from an {@link java.io.InputStream}
- *
- * @param is stream to unmarshall from
- * @return Object from stream passed in.
- */
- Object objectFromStream(InputStream is) throws Exception;
-
- /**
- * A specialized form of {@link org.jgroups.blocks.RpcDispatcher.Marshaller2#objectToBuffer(Object)} that returns an instance
- * of {@link org.jboss.starobrno.io.ByteBuffer} instead of {@link org.jgroups.util.Buffer}.
- *
- * @param o object to marshall
- * @return a ByteBuffer
- * @throws Exception
- */
- ByteBuffer objectToBuffer(Object o) throws Exception;
-}
\ No newline at end of file
Modified: core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValue.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/MarshalledValue.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValue.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import org.jboss.util.stream.MarshalledValueInputStream;
import java.io.ByteArrayInputStream;
@@ -39,12 +39,12 @@
/**
* Wrapper that wraps cached data, providing lazy deserialization using the calling thread's context class loader.
* <p/>
- * The {@link org.jboss.starobrno.interceptors.MarshalledValueInterceptor} handles transparent
+ * The {@link org.horizon.interceptors.MarshalledValueInterceptor} handles transparent
* wrapping/unwrapping of cached data.
* <p/>
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @see org.jboss.starobrno.interceptors.MarshalledValueInterceptor
+ * @see org.horizon.interceptors.MarshalledValueInterceptor
* @since 2.1.0
*/
public class MarshalledValue implements Externalizable
Modified: core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueHelper.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/MarshalledValueHelper.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueHelper.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.transaction.GlobalTransaction;
import org.jgroups.Address;
/**
- * Common functionality used by the {@link org.jboss.starobrno.interceptors.MarshalledValueInterceptor} and the {@link MarshalledValueMap}.
+ * Common functionality used by the {@link org.horizon.interceptors.MarshalledValueInterceptor} and the {@link MarshalledValueMap}.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
* @see MarshalledValue
- * @see org.jboss.starobrno.interceptors.MarshalledValueInterceptor
+ * @see org.horizon.interceptors.MarshalledValueInterceptor
* @see MarshalledValueMap
* @since 2.1.0
*/
Modified: core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueMap.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/MarshalledValueMap.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/MarshalledValueMap.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import net.jcip.annotations.Immutable;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.io.Externalizable;
import java.io.IOException;
Added: core/branches/flat/src/main/java/org/horizon/marshall/Marshaller.java
===================================================================
--- core/branches/flat/src/main/java/org/horizon/marshall/Marshaller.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/marshall/Marshaller.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.horizon.marshall;
+
+import org.horizon.io.ByteBuffer;
+import org.jgroups.blocks.RpcDispatcher;
+
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+/**
+ * A marshaller is a class that is able to marshall and unmarshall objects efficiently.
+ * <p/>
+ * The reason why this is implemented specially in JBoss Cache rather than resorting to
+ * Java serialization or even the more efficient JBoss serialization is that a lot of efficiency
+ * can be gained when a majority of the serialization that occurs has to do with a small set
+ * of known types such as {@link org.horizon.transaction.GlobalTransaction} or {@link org.horizon.commands.ReplicableCommand},
+ * and class type information can be replaced with simple magic numbers.
+ * <p/>
+ * Unknown types (typically user data) falls back to JBoss serialization.
+ * <p/>
+ * In addition, using a marshaller allows adding additional data to the byte stream, such as context
+ * class loader information on which class loader to use to deserialize the object stream, or versioning
+ * information to allow streams to interoperate between different versions of JBoss Cache (see {@link VersionAwareMarshaller}
+ * <p/>
+ * This interface implements the JGroups building-block interface {@link org.jgroups.blocks.RpcDispatcher.Marshaller} which
+ * is used to marshall {@link org.horizon.commands.ReplicableCommand}s, their parameters and their response values.
+ * <p/>
+ * The interface is also used by the {@link org.horizon.loader.CacheLoader} framework to efficiently serialize data to be persisted, as well as
+ * the {@link org.horizon.statetransfer.StateTransferManager} when serializing the cache for transferring state en-masse.
+ *
+ * @author <a href="mailto://manik@jboss.org">Manik Surtani</a>
+ * @since 2.0.0
+ */
+public interface Marshaller extends RpcDispatcher.Marshaller2
+{
+ /**
+ * Marshalls an object to a given {@link java.io.ObjectOutputStream}
+ *
+ * @param obj object to marshall
+ * @param out stream to marshall to
+ */
+ void objectToObjectStream(Object obj, ObjectOutputStream out) throws Exception;
+
+ /**
+ * Unmarshalls an object from an {@link java.io.ObjectInputStream}
+ *
+ * @param in stream to unmarshall from
+ */
+ Object objectFromObjectStream(ObjectInputStream in) throws Exception;
+
+ /**
+ * Unmarshalls an object from an {@link java.io.InputStream}
+ *
+ * @param is stream to unmarshall from
+ * @return Object from stream passed in.
+ */
+ Object objectFromStream(InputStream is) throws Exception;
+
+ /**
+ * A specialized form of {@link org.jgroups.blocks.RpcDispatcher.Marshaller2#objectToBuffer(Object)} that returns an instance
+ * of {@link org.horizon.io.ByteBuffer} instead of {@link org.jgroups.util.Buffer}.
+ *
+ * @param o object to marshall
+ * @return a ByteBuffer
+ * @throws Exception
+ */
+ ByteBuffer objectToBuffer(Object o) throws Exception;
+}
\ No newline at end of file
Property changes on: core/branches/flat/src/main/java/org/horizon/marshall/Marshaller.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/marshall/NodeData.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/NodeData.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/NodeData.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.tree.Fqn;
import java.io.Externalizable;
import java.io.IOException;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/NodeDataExceptionMarker.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/NodeDataExceptionMarker.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/NodeDataExceptionMarker.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.marshall.NodeData;
+import org.horizon.marshall.NodeData;
import java.io.IOException;
import java.io.ObjectInput;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/NodeDataMarker.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/NodeDataMarker.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/NodeDataMarker.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.marshall.NodeData;
+import org.horizon.marshall.NodeData;
public class NodeDataMarker extends NodeData
{
Modified: core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/UnmarshalledReferences.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/UnmarshalledReferences.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.util.ArrayList;
Modified: core/branches/flat/src/main/java/org/horizon/marshall/VersionAwareMarshaller.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/marshall/VersionAwareMarshaller.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/marshall/VersionAwareMarshaller.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,25 +19,24 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.marshall;
+package org.horizon.marshall;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.io.ByteBuffer;
-import org.jboss.starobrno.io.ExposedByteArrayOutputStream;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.commands.CommandsFactory;
+import org.horizon.io.ByteBuffer;
+import org.horizon.io.ExposedByteArrayOutputStream;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.config.Configuration;
+import org.horizon.commands.CommandsFactory;
import org.jboss.util.stream.MarshalledValueInputStream;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.util.StringTokenizer;
/**
- * A delegate to various other marshallers like {@link org.jboss.cache.marshall.CacheMarshaller200}.
+ * A delegate to various other marshallers like {@link CacheMarshallerStarobrno}.
* This delegating marshaller adds versioning information to the stream when marshalling objects and
* is able to pick the appropriate marshaller to delegate to based on the versioning information when
* unmarshalling objects.
@@ -45,7 +44,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
*/
-public class VersionAwareMarshaller implements ExtendedMarshaller
+public class VersionAwareMarshaller implements Marshaller
{
private static final Log log = LogFactory.getLog(VersionAwareMarshaller.class);
private boolean trace = log.isTraceEnabled();
Copied: core/branches/flat/src/main/java/org/horizon/notifications (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/notifications)
Copied: core/branches/flat/src/main/java/org/horizon/notifications/EventLog.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/notifications/EventLog.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/notifications/EventLog.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/notifications/EventLog.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,56 @@
+package org.horizon.notifications;
+
+import org.horizon.notifications.annotation.CacheEntryActivated;
+import org.horizon.notifications.annotation.CacheEntryCreated;
+import org.horizon.notifications.annotation.CacheEntryEvicted;
+import org.horizon.notifications.annotation.CacheEntryInvalidated;
+import org.horizon.notifications.annotation.CacheEntryModified;
+import org.horizon.notifications.annotation.CacheEntryPassivated;
+import org.horizon.notifications.annotation.CacheEntryRemoved;
+import org.horizon.notifications.annotation.CacheEntryVisited;
+import org.horizon.notifications.annotation.CacheListener;
+import org.horizon.notifications.annotation.TransactionCompleted;
+import org.horizon.notifications.annotation.TransactionRegistered;
+import org.horizon.notifications.event.Event;
+import org.horizon.notifications.event.EventImpl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+ at CacheListener
+public class EventLog
+{
+ public final List<Event> events = new ArrayList<Event>();
+
+ @CacheEntryCreated
+ @CacheEntryRemoved
+ @CacheEntryModified
+ @CacheEntryVisited
+ @TransactionCompleted
+ @TransactionRegistered
+ @CacheEntryEvicted
+ @CacheEntryPassivated
+ @CacheEntryActivated
+ @CacheEntryInvalidated
+ public void callback(Event e)
+ {
+ events.add(e);
+ }
+
+ public String toString()
+ {
+ return "EventLog{" +
+ "events=" + events +
+ '}';
+ }
+
+ /**
+ * Done when we don't have a Transaction reference to compare with, e.g., when using implicit transactions in
+ * opt locking.
+ */
+ public void scrubImplicitTransactions()
+ {
+ for (Event e : events) ((EventImpl) e).setTransaction(null);
+ }
+}
\ No newline at end of file
Property changes on: core/branches/flat/src/main/java/org/horizon/notifications/EventLog.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/notifications/IncorrectCacheListenerException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/IncorrectCacheListenerException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/IncorrectCacheListenerException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications;
+package org.horizon.notifications;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
/**
- * Thrown when an incorrectly annotated class is added as a cache listener using the {@link org.jboss.cache.Cache_Legacy#addCacheListener(Object)} API.
+ * Thrown when an incorrectly annotated class is added as a cache listener using the {@link org.horizon.Cache#addCacheListener(Object)} API.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/Notifier.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/Notifier.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/Notifier.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications;
+package org.horizon.notifications;
-import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.starobrno.context.InvocationContext;
+import org.horizon.context.InvocationContext;
import org.jgroups.View;
import javax.transaction.Transaction;
@@ -95,15 +94,6 @@
void notifyViewChange(View view, InvocationContext ctx);
/**
- * Notifies all registered listeners of a buddy group change event. Note that buddy group change notifications are ALWAYS sent
- * immediately.
- *
- * @param buddyGroup buddy group to set
- * @param pre if true, this has occured before the buddy group message is broadcast to the cluster
- */
- void notifyBuddyGroupChange(BuddyGroup buddyGroup, boolean pre);
-
- /**
* Notifies all registered listeners of a transaction completion event.
*
* @param transaction the transaction that has just completed
Modified: core/branches/flat/src/main/java/org/horizon/notifications/NotifierImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/NotifierImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/NotifierImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,28 +19,27 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications;
+package org.horizon.notifications;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.annotations.Destroy;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-import org.jboss.starobrno.notifications.annotation.*;
-import org.jboss.starobrno.notifications.event.*;
-import static org.jboss.starobrno.notifications.event.Event.Type.*;
-import org.jboss.starobrno.util.concurrent.BoundedExecutors;
-import org.jboss.starobrno.util.concurrent.WithinThreadExecutor;
+import org.horizon.Cache;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.annotations.Destroy;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
+import org.horizon.notifications.annotation.*;
+import org.horizon.notifications.event.*;
+import static org.horizon.notifications.event.Event.Type.*;
+import org.horizon.util.concurrent.BoundedExecutors;
+import org.horizon.util.concurrent.WithinThreadExecutor;
import org.jgroups.View;
import javax.transaction.Transaction;
@@ -221,7 +220,7 @@
{
CacheListener cl = listenerClass.getAnnotation(CacheListener.class);
if (cl == null)
- throw new IncorrectCacheListenerException("Cache listener class MUST be annotated with org.jboss.cache.notifications.annotation.CacheListener");
+ throw new IncorrectCacheListenerException("Cache listener class MUST be annotated with org.horizon.notifications.annotation.CacheListener");
if (!Modifier.isPublic(listenerClass.getModifiers()))
throw new IncorrectCacheListenerException("Cache listener class MUST be public!");
return cl.sync();
@@ -512,19 +511,6 @@
}
}
- public void notifyBuddyGroupChange(final BuddyGroup buddyGroup, boolean pre)
- {
- if (!buddyGroupChangedListeners.isEmpty())
- {
- EventImpl e = new EventImpl();
- e.setCache(cache);
- e.setBuddyGroup(buddyGroup);
- e.setPre(pre);
- e.setType(BUDDY_GROUP_CHANGED);
- for (ListenerInvocation listener : buddyGroupChangedListeners) listener.invoke(e);
- }
- }
-
public void notifyTransactionCompleted(Transaction transaction, boolean successful, InvocationContext ctx)
{
if (!transactionCompletedListeners.isEmpty())
@@ -568,7 +554,7 @@
/**
* Resets the current (passed-in) invocation, and returns a temp InvocationContext containing its state so it can
- * be restored later using {@link #restoreInvocationContext(org.jboss.cache.InvocationContext)}
+ * be restored later using {@link #restoreInvocationContext(InvocationContext)}
*
* @param ctx the current context to be reset
* @return a clone of ctx, before it was reset
Deleted: core/branches/flat/src/main/java/org/horizon/notifications/annotation/BuddyGroupChanged.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/BuddyGroupChanged.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/BuddyGroupChanged.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.notifications.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * This annotation should be used on methods that need to be notified when a buddy group changes.
- * <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.BuddyGroupChangedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
- * your cache listener.
- * <p/>
- * This call back only occurs when a buddy group structure is changed. In a cache setup where buddy replication is not
- * enabled, this call back would never occur.
- * <p/>
- *
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
- * @see CacheListener
- * @see org.jboss.cache.notifications.event.CacheBlockedEvent
- * @since 2.1.0
- */
- at Retention(RetentionPolicy.RUNTIME)
- at Target(ElementType.METHOD)
-public @interface BuddyGroupChanged
-{
-}
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryActivated.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryActivated.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryActivated.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -29,13 +29,13 @@
/**
* This annotation should be used on methods that need to be notified when a node is activated.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeActivatedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeActivatedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @see CacheListener
- * @see org.jboss.cache.notifications.annotation.NodePassivated
+ * @see org.horizon.notifications.annotation.NodePassivated
* @since 2.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryCreated.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryCreated.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryCreated.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -29,8 +29,8 @@
/**
* This annotation should be used on methods that need to be notified when a node is created.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeCreatedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeCreatedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryEvicted.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryEvicted.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryEvicted.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -29,13 +29,13 @@
/**
* This annotation should be used on methods that need to be notified when a node is evicted.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeEvictedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeEvictedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @see CacheListener
- * @see org.jboss.cache.notifications.annotation.NodeLoaded
+ * @see org.horizon.notifications.annotation.NodeLoaded
* @since 2.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryInvalidated.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryInvalidated.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryInvalidated.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -29,12 +29,12 @@
/**
* This annotation should be used on methods that need to be notified when a node is invalidated.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeInvalidatedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeInvalidatedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
- * @see org.jboss.cache.notifications.annotation.CacheListener
+ * @see org.horizon.notifications.annotation.CacheListener
* @since 3.0
*/
@Retention(RetentionPolicy.RUNTIME)
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryLoaded.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryLoaded.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryLoaded.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -27,10 +27,10 @@
import java.lang.annotation.Target;
/**
- * This annotation should be used on methods that need to be notified when a node is loaded from a {@link org.jboss.cache.loader.CacheLoader}.
+ * This annotation should be used on methods that need to be notified when a node is loaded from a {@link org.horizon.loader.CacheLoader}.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeEvictedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeEvictedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryModified.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryModified.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryModified.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -29,8 +29,8 @@
/**
* This annotation should be used on methods that need to be notified when a node has been modified.
* <p/>
- * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.jboss.cache.notifications.event.NodeModifiedEvent}
- * otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown when registering
+ * Methods annotated with this annotation should be public and take in a single parameter, a {@link org.horizon.notifications.event.NodeModifiedEvent}
+ * otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown when registering
* your cache listener.
* <p/>
*
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryPassivated.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryPassivated.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryPassivated.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,7 +30,7 @@
* This annotation should be used on methods that need to be notified when a node is passivated.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.NodePassivatedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.NodePassivatedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryRemoved.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryRemoved.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryRemoved.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,7 +30,7 @@
* This annotation should be used on methods that need to be notified when a node is removed from the cache.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.TransactionRegisteredEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.TransactionRegisteredEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryVisited.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheEntryVisited.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheEntryVisited.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,7 +30,7 @@
* This annotation should be used on methods that need to be notified when a node is visited.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.NodeVisitedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.NodeVisitedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheListener.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheListener.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -28,13 +28,13 @@
/**
* Class-level annotation used to annotate an object as being a valid cache listener. Used with the
- * {@link org.jboss.cache.Cache_Legacy#addCacheListener(Object)} and related APIs.
+ * {@link org.horizon.Cache_Legacy#addCacheListener(Object)} and related APIs.
* <p/>
* Note that even if a class is annotated with this annotation, it still needs method-level annotation (such as
- * {@link org.jboss.cache.notifications.annotation.CacheStarted}) to actually receive notifications.
+ * {@link org.horizon.notifications.annotation.CacheStarted}) to actually receive notifications.
* <p/>
- * Objects annotated with this annotation - listeners - can be attached to a running {@link org.jboss.cache.Cache_Legacy} so
- * users can be notified of {@link org.jboss.cache.Cache_Legacy} events.
+ * Objects annotated with this annotation - listeners - can be attached to a running {@link org.horizon.Cache_Legacy} so
+ * users can be notified of {@link org.horizon.Cache_Legacy} events.
* <p/>
* <p/>
* There can be multiple methods that are annotated to receive the same event,
@@ -56,8 +56,8 @@
* outcome is not yet known. For this reason, <i>events are always delivered, even
* if the changes they represent are discarded by their containing transaction</i>.
* For applications that must only process events that represent changes in a
- * completed transaction, {@link org.jboss.cache.notifications.event.TransactionalEvent#getTransaction()} can be used,
- * along with {@link org.jboss.cache.notifications.event.TransactionCompletedEvent#isSuccessful()} to record events and
+ * completed transaction, {@link org.horizon.notifications.event.TransactionalEvent#getTransaction()} can be used,
+ * along with {@link org.horizon.notifications.event.TransactionCompletedEvent#isSuccessful()} to record events and
* later process them once the transaction has been successfully committed.
* Example 4 demonstrates this.
* </p>
@@ -82,7 +82,7 @@
* <b>Note</b>: Since 3.0, a new parameter, <tt>sync</tt>, has been introduced on this annotation. This defaults to <tt>true</tt>
* which provides the above semantics. Alternatively, if you set <tt>sync</tt> to <tt>false</tt>, then invocations are made in a
* <i>separate</i> thread, which will not cause any blocking on the caller or network thread. The separate thread is taken
- * from a pool, which can be configured using {@link org.jboss.cache.config.Configuration#setListenerAsyncPoolSize(int)}.
+ * from a pool, which can be configured using {@link org.horizon.config.Configuration#setListenerAsyncPoolSize(int)}.
* <p/>
* <b>Summary of Notification Annotations</b>
* <table border="1" cellpadding="1" cellspacing="1" summary="Summary of notification annotations">
@@ -93,92 +93,92 @@
* </tr>
* <tr>
* <td valign="top">{@link CacheStarted}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.CacheStartedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.CacheStartedEvent}</td>
* <td valign="top">A cache was started</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheStopped}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.CacheStoppedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.CacheStoppedEvent}</td>
* <td valign="top">A cache was stopped</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryModified}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeModifiedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeModifiedEvent}</td>
* <td valign="top">A node was modified</td>
* </tr>
* <tr>
* <td valign="top">{@link NodeMoved}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeMovedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeMovedEvent}</td>
* <td valign="top">A node was moved</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryCreated}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeCreatedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeCreatedEvent}</td>
* <td valign="top">A node was created</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryRemoved}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeRemovedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeRemovedEvent}</td>
* <td valign="top">A node was removed</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryVisited}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeVisitedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeVisitedEvent}</td>
* <td valign="top">A node was visited</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryLoaded}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeLoadedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeLoadedEvent}</td>
* <td valign="top">A node was loaded</td>
* </tr>
* <tr>
- * <td valign="top">{@link org.jboss.cache.notifications.annotation.NodeEvicted}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeEvictedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.annotation.NodeEvicted}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeEvictedEvent}</td>
* <td valign="top">A node was evicted</td>
* </tr>
* <tr>
- * <td valign="top">{@link org.jboss.cache.notifications.annotation.NodeActivated}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodeActivatedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.annotation.NodeActivated}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodeActivatedEvent}</td>
* <td valign="top">A node was activated</td>
* </tr>
* <tr>
- * <td valign="top">{@link org.jboss.cache.notifications.annotation.NodePassivated}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.NodePassivatedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.annotation.NodePassivated}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.NodePassivatedEvent}</td>
* <td valign="top">A node was passivated</td>
* </tr>
* <tr>
- * <td valign="top">{@link org.jboss.cache.notifications.annotation.ViewChanged}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.ViewChangedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.annotation.ViewChanged}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.ViewChangedEvent}</td>
* <td valign="top">A view change event was detected</td>
* </tr>
* <tr>
- * <td valign="top">{@link org.jboss.cache.notifications.annotation.CacheBlocked}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.CacheBlockedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.annotation.CacheBlocked}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.CacheBlockedEvent}</td>
* <td valign="top">A cache block event was detected</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheUnblocked}</td>
- * <td valign="top">{@link org.jboss.cache.notifications.event.CacheUnblockedEvent}</td>
+ * <td valign="top">{@link org.horizon.notifications.event.CacheUnblockedEvent}</td>
* <td valign="top">A cache unblock event was detected</td>
* </tr>
* <tr>
* <td valign="top">{@link TransactionRegistered}</td>
- * <td valign@="top">{@link org.jboss.cache.notifications.event.TransactionRegisteredEvent}</td>
+ * <td valign@="top">{@link org.horizon.notifications.event.TransactionRegisteredEvent}</td>
* <td valign="top">The cache has started to participate in a transaction</td>
* </tr>
* <tr>
* <td valign="top">{@link TransactionCompleted}</td>
- * <td valign=@"top">{@link org.jboss.cache.notifications.event.TransactionCompletedEvent}</td>
+ * <td valign=@"top">{@link org.horizon.notifications.event.TransactionCompletedEvent}</td>
* <td valign="top">The cache has completed its participation in a transaction</td>
* </tr>
* <tr>
* <td valign="top">{@link BuddyGroupChanged}</td>
- * <td valign=@"top">{@link org.jboss.cache.notifications.event.BuddyGroupChangedEvent}</td>
+ * <td valign=@"top">{@link org.horizon.notifications.event.BuddyGroupChangedEvent}</td>
* <td valign="top">Buddy replication is enabled and one of the buddy groups that the instance is a member of has changed its membership.</td>
* </tr>
* <tr>
* <td valign="top">{@link CacheEntryInvalidated}</td>
- * <td valign=@"top">{@link org.jboss.cache.notifications.event.NodeInvalidatedEvent}</td>
+ * <td valign=@"top">{@link org.horizon.notifications.event.NodeInvalidatedEvent}</td>
* <td valign="top">A node was invalidated by a remote cache. Only if cache mode is INVALIDATION_SYNC or INVALIDATION_ASYNC.</td>
* </tr>
* <p/>
@@ -313,9 +313,9 @@
* @see TransactionRegistered
* @see BuddyGroupChanged
* @see CacheEntryInvalidated
- * @see org.jboss.cache.Cache_Legacy#addCacheListener(Object)
- * @see org.jboss.cache.Cache_Legacy#removeCacheListener(Object)
- * @see org.jboss.cache.Cache_Legacy#getCacheListeners()
+ * @see org.horizon.Cache_Legacy#addCacheListener(Object)
+ * @see org.horizon.Cache_Legacy#removeCacheListener(Object)
+ * @see org.horizon.Cache_Legacy#getCacheListeners()
* @since 2.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStarted.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheStarted.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStarted.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,7 +30,7 @@
* This annotation should be used on methods that need to be notified when a cache is started.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.CacheStartedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.CacheStartedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStopped.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/CacheStopped.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/CacheStopped.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -30,7 +30,7 @@
* This annotation should be used on methods that need to be notified when a cache is stopped.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.CacheStoppedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.CacheStoppedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionCompleted.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/TransactionCompleted.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionCompleted.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -31,11 +31,11 @@
* the transaction completes, either with a commit or a rollback.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.TransactionCompletedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.TransactionCompletedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
* <p/>
* Note that methods marked with this annotation will only be fired <i>after the fact</i>, i.e., your method will never be
- * called with {@link org.jboss.cache.notifications.event.Event#isPre()} being set to <tt>true</tt>.
+ * called with {@link org.horizon.notifications.event.Event#isPre()} being set to <tt>true</tt>.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @see CacheListener
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionRegistered.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/TransactionRegistered.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/TransactionRegistered.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -31,11 +31,11 @@
* registers a {@link javax.transaction.Synchronization} with a registered {@link javax.transaction.TransactionManager}.
* <p/>
* Methods annotated with this annotation should accept a single
- * parameter, a {@link org.jboss.cache.notifications.event.TransactionRegisteredEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * parameter, a {@link org.horizon.notifications.event.TransactionRegisteredEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
* <p/>
* Note that methods marked with this annotation will only be fired <i>after the fact</i>, i.e., your method will never be
- * called with {@link org.jboss.cache.notifications.event.Event#isPre()} being set to <tt>true</tt>.
+ * called with {@link org.horizon.notifications.event.Event#isPre()} being set to <tt>true</tt>.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @see CacheListener
Modified: core/branches/flat/src/main/java/org/horizon/notifications/annotation/ViewChanged.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/annotation/ViewChanged.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/annotation/ViewChanged.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.annotation;
+package org.horizon.notifications.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
@@ -31,7 +31,7 @@
* changes (i.e., a member joins or leaves the cluster).
* <p/>
* Methods annotated with this annotation should accept a single parameter,
- * a {@link org.jboss.cache.notifications.event.ViewChangedEvent} otherwise a {@link org.jboss.cache.notifications.IncorrectCacheListenerException}
+ * a {@link org.horizon.notifications.event.ViewChangedEvent} otherwise a {@link org.horizon.notifications.IncorrectCacheListenerException}
* will be thrown when registering your listener.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
Deleted: core/branches/flat/src/main/java/org/horizon/notifications/event/BuddyGroupChangedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/BuddyGroupChangedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/BuddyGroupChangedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno.notifications.event;
-
-import org.jboss.cache.buddyreplication.BuddyGroup;
-
-/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.BuddyGroupChanged}.
- *
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
- * @since 2.1.0
- */
-public interface BuddyGroupChangedEvent extends Event
-{
- /**
- * @return the new buddy group
- * @since 2.1.0
- */
- BuddyGroup getBuddyGroup();
-}
\ No newline at end of file
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryActivatedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryActivatedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryActivatedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeActivated}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeActivated}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryCreatedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryCreatedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryCreatedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeCreated}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeCreated}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
* Transactional events that additionally expose an Fqn as such events pertain to a specific node.
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvictedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryEvictedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryEvictedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeEvicted}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeEvicted}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryInvalidatedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryInvalidatedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryInvalidatedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
* Notifies a listener of an invalidation event
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryLoadedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryLoadedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryLoadedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeLoaded}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeLoaded}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryModifiedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryModifiedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryModifiedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeModified}
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeModified}
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryPassivatedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryPassivatedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryPassivatedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodePassivated}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodePassivated}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryRemovedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryRemovedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryRemovedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeRemoved}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeRemoved}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryVisitedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheEntryVisitedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheEntryVisitedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.NodeVisited}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.NodeVisited}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStartedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheStartedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStartedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.CacheStarted}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.CacheStarted}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStoppedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/CacheStoppedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/CacheStoppedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.CacheStopped}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.CacheStopped}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/Event.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/Event.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/Event.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
/**
* An interface that defines common characteristics of events
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/EventImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/EventImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
-import org.jboss.cache.buddyreplication.BuddyGroup;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.buddyreplication.BuddyGroup;
+import org.horizon.Cache;
+import org.horizon.tree.Fqn;
import org.jgroups.View;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionCompletedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/TransactionCompletedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionCompletedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.TransactionCompleted}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.TransactionCompleted}.
* <p/>
* Note that this event is only delivered <i>after the fact</i>, i.e., you will never see an instance of this event
* with {@link #isPre()} being set to <tt>true</tt>.
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionRegisteredEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/TransactionRegisteredEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionRegisteredEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,10 +19,10 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.TransactionRegistered}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.TransactionRegistered}.
* <p/>
* Note that this event is only delivered <i>after the fact</i>, i.e., you will never see an instance of this event
* with {@link #isPre()} being set to <tt>true</tt>.
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionalEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/TransactionalEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/TransactionalEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/main/java/org/horizon/notifications/event/ViewChangedEvent.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/notifications/event/ViewChangedEvent.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/notifications/event/ViewChangedEvent.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.notifications.event;
+package org.horizon.notifications.event;
import org.jgroups.View;
/**
- * This event is passed in to any method annotated with {@link org.jboss.cache.notifications.annotation.ViewChanged}.
+ * This event is passed in to any method annotated with {@link org.horizon.notifications.annotation.ViewChanged}.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
* @since 2.0.0
Copied: core/branches/flat/src/main/java/org/horizon/remoting (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/remoting)
Modified: core/branches/flat/src/main/java/org/horizon/remoting/ChannelMessageListener.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/ChannelMessageListener.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/ChannelMessageListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.remoting;
+package org.horizon.remoting;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.io.ExposedByteArrayOutputStream;
-import org.jboss.starobrno.statetransfer.DefaultStateTransferManager;
-import org.jboss.starobrno.statetransfer.StateTransferManager;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.CacheException;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.io.ExposedByteArrayOutputStream;
+import org.horizon.statetransfer.DefaultStateTransferManager;
+import org.horizon.statetransfer.StateTransferManager;
+import org.horizon.tree.Fqn;
import org.jboss.util.stream.MarshalledValueInputStream;
import org.jboss.util.stream.MarshalledValueOutputStream;
import org.jgroups.ExtendedMessageListener;
Modified: core/branches/flat/src/main/java/org/horizon/remoting/RPCManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/RPCManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/RPCManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.remoting;
+package org.horizon.remoting;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.factories.scopes.Scope;
+import org.horizon.factories.scopes.Scopes;
import org.jgroups.Address;
import org.jgroups.Channel;
import org.jgroups.blocks.RspFilter;
Modified: core/branches/flat/src/main/java/org/horizon/remoting/RPCManagerImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/RPCManagerImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/RPCManagerImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,33 +19,33 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.remoting;
+package org.horizon.remoting;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.RuntimeConfig;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.factories.annotations.Stop;
-import org.jboss.starobrno.interceptors.InterceptorChain;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.jmx.annotations.MBean;
-import org.jboss.starobrno.jmx.annotations.ManagedAttribute;
-import org.jboss.starobrno.jmx.annotations.ManagedOperation;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.lock.TimeoutException;
-import org.jboss.starobrno.marshall.CommandAwareRpcDispatcher;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jboss.starobrno.util.ReflectionUtil;
-import org.jboss.starobrno.util.concurrent.ReclosableLatch;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.config.Configuration;
+import org.horizon.config.RuntimeConfig;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.factories.annotations.Stop;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.annotations.MBean;
+import org.horizon.annotations.ManagedAttribute;
+import org.horizon.annotations.ManagedOperation;
+import org.horizon.lock.LockManager;
+import org.horizon.lock.TimeoutException;
+import org.horizon.marshall.CommandAwareRpcDispatcher;
+import org.horizon.marshall.Marshaller;
+import org.horizon.notifications.Notifier;
+import org.horizon.transaction.TransactionTable;
+import org.horizon.util.ReflectionUtil;
+import org.horizon.util.concurrent.ReclosableLatch;
import org.jgroups.*;
import org.jgroups.blocks.GroupRequest;
import org.jgroups.blocks.RspFilter;
@@ -100,7 +100,7 @@
private CacheSPI spi;
private InvocationContextContainer invocationContextContainer;
private final boolean trace = log.isTraceEnabled();
- private ExtendedMarshaller extendedMarshaller;
+ private Marshaller marshaller;
private TransactionManager txManager;
private TransactionTable txTable;
private InterceptorChain interceptorChain;
@@ -111,7 +111,7 @@
@Inject
public void setupDependencies(ChannelMessageListener messageListener, Configuration configuration, Notifier notifier,
- ExtendedMarshaller extendedMarshaller, TransactionTable txTable,
+ Marshaller extendedMarshaller, TransactionTable txTable,
TransactionManager txManager, InvocationContextContainer container, InterceptorChain interceptorChain,
ComponentRegistry componentRegistry, LockManager lockManager, CacheSPI spi)
{
@@ -119,7 +119,7 @@
this.configuration = configuration;
this.notifier = notifier;
this.spi = spi;
- this.extendedMarshaller = extendedMarshaller;
+ this.marshaller = extendedMarshaller;
this.txManager = txManager;
this.txTable = txTable;
this.invocationContextContainer = container;
@@ -206,8 +206,8 @@
rpcDispatcher = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
invocationContextContainer, invocationContextContainer, interceptorChain, componentRegistry);
checkAppropriateConfig();
- rpcDispatcher.setRequestMarshaller(extendedMarshaller);
- rpcDispatcher.setResponseMarshaller(extendedMarshaller);
+ rpcDispatcher.setRequestMarshaller(marshaller);
+ rpcDispatcher.setResponseMarshaller(marshaller);
}
private void buildChannel()
Modified: core/branches/flat/src/main/java/org/horizon/remoting/ReplicationException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/ReplicationException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/ReplicationException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.remoting;
+package org.horizon.remoting;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
/**
* Thrown when a replication problem occurred
Modified: core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/SuspectException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/SuspectException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.remoting;
+package org.horizon.remoting;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
/**
* Thrown when a member is suspected during remote method invocation
Modified: core/branches/flat/src/main/java/org/horizon/remoting/transport/Address.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/transport/Address.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/transport/Address.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.remoting.transport;
+package org.horizon.remoting.transport;
/**
* // TODO: Manik: Document this!
Modified: core/branches/flat/src/main/java/org/horizon/remoting/transport/Transport.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/remoting/transport/Transport.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/remoting/transport/Transport.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.remoting.transport;
+package org.horizon.remoting.transport;
-import org.jboss.starobrno.lifecycle.Lifecycle;
+import org.horizon.lifecycle.Lifecycle;
import java.util.List;
import java.util.Properties;
Copied: core/branches/flat/src/main/java/org/horizon/statetransfer (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/statetransfer)
Modified: core/branches/flat/src/main/java/org/horizon/statetransfer/DefaultStateTransferManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/statetransfer/DefaultStateTransferManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/statetransfer/DefaultStateTransferManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,29 +19,26 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.statetransfer;
+package org.horizon.statetransfer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.NodeSPI;
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.loader.CacheLoaderManager;
-import org.jboss.cache.marshall.Marshaller;
-import org.jboss.cache.statetransfer.StateTransferGenerator;
-import org.jboss.cache.statetransfer.StateTransferIntegrator;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.Start;
-import org.jboss.starobrno.marshall.NodeData;
-import org.jboss.starobrno.marshall.NodeDataMarker;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.Start;
+import org.horizon.loader.CacheLoaderManager;
+import org.horizon.marshall.Marshaller;
+import org.horizon.marshall.NodeData;
+import org.horizon.marshall.NodeDataMarker;
+import org.horizon.tree.Fqn;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
/**
* The default state transfer manager to be used when using MVCC locking.
+ * // TODO: implement me
*/
public class DefaultStateTransferManager implements StateTransferManager
{
@@ -54,26 +51,26 @@
protected CacheSPI cache;
protected Marshaller marshaller;
- protected RegionManager regionManager;
+// protected RegionManager regionManager;
protected Configuration configuration;
private CacheLoaderManager cacheLoaderManager;
boolean fetchTransientState;
boolean fetchPersistentState;
protected long stateRetrievalTimeout;
- protected StateTransferIntegrator integrator;
- protected StateTransferGenerator generator;
+// protected StateTransferIntegrator integrator;
+// protected StateTransferGenerator generator;
@Inject
public void injectDependencies()
{
this.cache = cache;
- this.regionManager = regionManager;
+// this.regionManager = regionManager;
this.marshaller = marshaller;
this.configuration = configuration;
this.cacheLoaderManager = cacheLoaderManager;
- this.integrator = integrator;
- this.generator = generator;
+// this.integrator = integrator;
+// this.generator = generator;
}
@Start(priority = 14)
@@ -181,7 +178,9 @@
* persistent state (or null)
* @param targetRoot node into which the state should be integrated
*/
- protected void setState(ObjectInputStream state, NodeSPI targetRoot) throws Exception
+ // TODO: implement me
+ protected void setState()
+// protected void setState(ObjectInputStream state, NodeSPI targetRoot) throws Exception
{
long startTime = System.currentTimeMillis();
/*
@@ -192,9 +191,10 @@
* to be directly stored into a tree since we bypass interceptor chain.
*
*/
- if (log.isDebugEnabled())
- log.debug("starting state integration at node " + targetRoot + ". Fetch Persistent State = " + fetchPersistentState);
- integrator.integrateState(state, targetRoot.getDelegationTarget(), targetRoot.getFqn(), fetchPersistentState);
+ // TODO: implement me
+// if (log.isDebugEnabled())
+// log.debug("starting state integration at node " + targetRoot + ". Fetch Persistent State = " + fetchPersistentState);
+// integrator.integrateState(state, targetRoot.getDelegationTarget(), targetRoot.getFqn(), fetchPersistentState);
if (log.isDebugEnabled())
log.debug("successfully integrated state in " + (System.currentTimeMillis() - startTime) + " msec");
Modified: core/branches/flat/src/main/java/org/horizon/statetransfer/StateTransferManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/statetransfer/StateTransferManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/statetransfer/StateTransferManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.statetransfer;
+package org.horizon.statetransfer;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.tree.Fqn;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -67,8 +67,6 @@
* is up to the caller to lock <code>targetRoot</code> before calling
* this method.
* <p/>
- * This method will use any {@link ClassLoader} needed as defined by the active {@link org.jboss.cache.Region}
- * in the {@link org.jboss.cache.RegionManager}, pertaining to the targetRoot passed in.
*
* @param in an input stream containing the state
* @param targetRoot fqn of the node into which the state should be integrated
Copied: core/branches/flat/src/main/java/org/horizon/transaction (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/transaction)
Modified: core/branches/flat/src/main/java/org/horizon/transaction/BatchModeTransactionManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/BatchModeTransactionManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/BatchModeTransactionManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/DummyBaseTransactionManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/DummyBaseTransactionManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/DummyBaseTransactionManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/DummyTransaction.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/DummyTransaction.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/DummyTransaction.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/DummyTransactionManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -56,7 +56,6 @@
try
{
Properties p = new Properties();
-// p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
Context ctx = new InitialContext(p);
ctx.bind("java:/TransactionManager", instance);
ctx.bind("UserTransaction", utx);
@@ -82,7 +81,6 @@
try
{
Properties p = new Properties();
- p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
Context ctx = new InitialContext(p);
ctx.unbind("java:/TransactionManager");
ctx.unbind("UserTransaction");
Modified: core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManagerLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/DummyTransactionManagerLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/DummyTransactionManagerLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import javax.transaction.TransactionManager;
@@ -27,7 +27,7 @@
/**
- * Returns an instance of {@link org.jboss.starobrno.transaction.DummyTransactionManager}.
+ * Returns an instance of {@link org.horizon.transaction.DummyTransactionManager}.
*
* @author Bela Ban Sept 5 2003
* @version $Id$
Modified: core/branches/flat/src/main/java/org/horizon/transaction/DummyUserTransaction.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/DummyUserTransaction.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/DummyUserTransaction.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/GenericTransactionManagerLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/GenericTransactionManagerLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/GenericTransactionManagerLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -43,7 +43,7 @@
* <li> Websphere 4.0, 5.0, 5.1, 6.0
* <li> Sun, Glassfish
* </ul>
- * If a transaction manager is not found, returns a {@link org.jboss.starobrno.transaction.DummyTransactionManager}.
+ * If a transaction manager is not found, returns a {@link org.horizon.transaction.DummyTransactionManager}.
*
* @author Markus Plesser
* @version $Id$
Modified: core/branches/flat/src/main/java/org/horizon/transaction/GlobalTransaction.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/GlobalTransaction.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/GlobalTransaction.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.jgroups.Address;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/JBossStandaloneJTAManagerLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/JBossStandaloneJTAManagerLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/JBossStandaloneJTAManagerLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/JBossTransactionManagerLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/JBossTransactionManagerLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/JBossTransactionManagerLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import javax.naming.InitialContext;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/main/java/org/horizon/transaction/TransactionManagerLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/TransactionManagerLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/TransactionManagerLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import javax.transaction.TransactionManager;
/**
- * Factory interface, allows {@link org.jboss.cache.Cache_Legacy} to use different transactional systems.
+ * Factory interface, allows {@link org.horizon.Cache} to use different transactional systems.
* Names of implementors of this class can be configured using
* {@link Configuration#setTransactionManagerLookupClass}.
*
Modified: core/branches/flat/src/main/java/org/horizon/transaction/TransactionTable.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/transaction/TransactionTable.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/transaction/TransactionTable.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,17 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.transaction;
+package org.horizon.transaction;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.context.TransactionContext;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.context.ContextFactory;
-import org.jboss.starobrno.remoting.RPCManager;
+import org.horizon.CacheException;
+import org.horizon.context.InvocationContext;
+import org.horizon.context.TransactionContext;
+import org.horizon.factories.annotations.Inject;
+import org.horizon.factories.annotations.NonVolatile;
+import org.horizon.factories.context.ContextFactory;
+import org.horizon.remoting.RPCManager;
import org.jgroups.Address;
import javax.transaction.Status;
Copied: core/branches/flat/src/main/java/org/horizon/tree (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/tree)
Modified: core/branches/flat/src/main/java/org/horizon/tree/Fqn.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/Fqn.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/Fqn.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
import net.jcip.annotations.Immutable;
-import org.jboss.starobrno.util.Immutables;
+import org.horizon.util.Immutables;
import java.io.Externalizable;
import java.io.IOException;
@@ -36,10 +36,10 @@
/**
* A Fully Qualified Name (Fqn) is a list of names (typically Strings but can be any Object),
- * which represent a path to a particular {@link Node} or sometimes a {@link Region} in a {@link Cache}.
+ * which represent a path to a particular {@link Node} in a {@link TreeCache}.
* <p/>
* This name can be absolute (i.e., relative from the root node - {@link #ROOT}), or relative to any node in the cache. Reading the
- * documentation on each API call that makes use of {@link org.jboss.cache.Fqn}s will tell you whether the API expects a
+ * documentation on each API call that makes use of {@link Fqn}s will tell you whether the API expects a
* relative or absolute Fqn.
* <p/>
* For instance, using this class to fetch a particular node might look like
Modified: core/branches/flat/src/main/java/org/horizon/tree/FqnComparator.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/FqnComparator.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/FqnComparator.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
import net.jcip.annotations.Immutable;
Modified: core/branches/flat/src/main/java/org/horizon/tree/Node.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/Node.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/Node.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
import net.jcip.annotations.ThreadSafe;
@@ -42,7 +42,7 @@
* <p/>
*
* @author <a href="mailto:manik AT jboss DOT org">Manik Surtani (manik AT jboss DOT org)</a>
- * @see org.jboss.starobrno.tree.TreeCache
+ * @see org.horizon.tree.TreeCache
*/
@ThreadSafe
public interface Node<K, V>
@@ -283,7 +283,7 @@
/**
* Tests if a node reference is still valid. A node reference may become invalid if it has been removed, invalidated
* or moved, either locally or remotely. If a node is invalid, it should be fetched again from the cache or a valid
- * parent node. Operations on invalid nodes will throw a {@link org.jboss.cache.NodeNotValidException}.
+ * parent node. Operations on invalid nodes will throw a {@link org.horizon.tree.NodeNotValidException}.
*
* @return true if the node is valid.
*/
Modified: core/branches/flat/src/main/java/org/horizon/tree/NodeImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/NodeImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,12 +19,12 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.atomic.AtomicMap;
-import org.jboss.starobrno.util.Immutables;
-import org.jboss.starobrno.util.Util;
+import org.horizon.Cache;
+import org.horizon.atomic.AtomicMap;
+import org.horizon.util.Immutables;
+import org.horizon.util.Util;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/tree/NodeKey.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeKey.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/NodeKey.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -21,9 +21,9 @@
*
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
-import org.jboss.starobrno.util.Util;
+import org.horizon.util.Util;
import java.io.Serializable;
Modified: core/branches/flat/src/main/java/org/horizon/tree/TreeCache.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCache.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/TreeCache.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,17 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.NodeNotExistsException;
-import org.jboss.cache.Region;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.lifecycle.Lifecycle;
+import org.horizon.Cache;
+import org.horizon.CacheException;
+import org.horizon.CacheStatus;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.lifecycle.Lifecycle;
import org.jgroups.Address;
import java.util.List;
@@ -65,25 +63,25 @@
Node<K, V> getRoot();
/**
- * Adds a {@link org.jboss.cache.notifications.annotation.CacheListener}-annotated object to the entire cache. The object passed in needs to be properly annotated with the
- * {@link org.jboss.cache.notifications.annotation.CacheListener} annotation otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown.
+ * Adds a {@link org.horizon.notifications.annotation.CacheListener}-annotated object to the entire cache. The object passed in needs to be properly annotated with the
+ * {@link org.horizon.notifications.annotation.CacheListener} annotation otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown.
*
* @param listener listener to add
*/
void addCacheListener(Object listener);
/**
- * Removes a {@link org.jboss.cache.notifications.annotation.CacheListener}-annotated object from the cache. The object passed in needs to be properly annotated with the
- * {@link org.jboss.cache.notifications.annotation.CacheListener} annotation otherwise an {@link org.jboss.cache.notifications.IncorrectCacheListenerException} will be thrown.
+ * Removes a {@link org.horizon.notifications.annotation.CacheListener}-annotated object from the cache. The object passed in needs to be properly annotated with the
+ * {@link org.horizon.notifications.annotation.CacheListener} annotation otherwise an {@link org.horizon.notifications.IncorrectCacheListenerException} will be thrown.
*
* @param listener listener to remove
*/
void removeCacheListener(Object listener);
/**
- * Retrieves an immutable {@link List} of objects annotated as {@link org.jboss.cache.notifications.annotation.CacheListener}s attached to the cache.
+ * Retrieves an immutable {@link List} of objects annotated as {@link org.horizon.notifications.annotation.CacheListener}s attached to the cache.
*
- * @return an immutable {@link List} of objects annotated as {@link org.jboss.cache.notifications.annotation.CacheListener}s attached to the cache.
+ * @return an immutable {@link List} of objects annotated as {@link org.horizon.notifications.annotation.CacheListener}s attached to the cache.
*/
Set<Object> getCacheListeners();
@@ -137,7 +135,7 @@
* @param fqn <b><i>absolute</i></b> {@link Fqn} to the {@link Node} to be accessed.
* @param key key with which the specified value is to be associated.
* @param value value to be associated with the specified key.
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.jboss.cache.CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
void putForExternalRead(Fqn fqn, K key, V value);
@@ -256,28 +254,6 @@
void evict(Fqn fqn);
/**
- * Retrieves a {@link Region} for a given {@link Fqn}. If the region does not exist,
- * and <li>createIfAbsent</li> is true, then one is created.
- * <p/>
- * If not, parent Fqns will be consulted in turn for registered regions, gradually working up to
- * Fqn.ROOT. If no regions are defined in any of the parents either, a null is returned.
- *
- * @param fqn Fqn that is contained in a region.
- * @param createIfAbsent If true, will create a new associated region if not found.
- * @return a MarshRegion. Null if none is found.
- * @see Region
- */
- Region getRegion(Fqn fqn, boolean createIfAbsent);
-
- /**
- * Removes a region denoted by the Fqn passed in.
- *
- * @param fqn of the region to remove
- * @return true if a region did exist and was removed; false otherwise.
- */
- boolean removeRegion(Fqn fqn);
-
- /**
* Gets where the cache currently is its lifecycle transitions.
*
* @return the CacheStatus. Will not return <code>null</code>.
@@ -291,7 +267,7 @@
InvocationContext getInvocationContext();
/**
- * Sets the passed in {@link org.jboss.cache.InvocationContext} as current.
+ * Sets the passed in {@link InvocationContext} as current.
*
* @param ctx invocation context to use
* @throws IllegalStateException if the cache has been destroyed.
@@ -368,33 +344,25 @@
* @param nodeToMove the Fqn of the node to move.
* @param newParent new location under which to attach the node being moved.
* @throws NodeNotExistsException may throw one of these if the target node does not exist or if a different thread has moved this node elsewhere already.
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
void move(Fqn nodeToMove, Fqn newParent) throws NodeNotExistsException;
/**
* Convenience method that takes in string representations of Fqns. Otherwise identical to {@link #move(Fqn, Fqn)}
*
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
void move(String nodeToMove, String newParent) throws NodeNotExistsException;
/**
- * Returns the version of the cache as a string.
- *
- * @return the version string of the cache.
- * @see Version#printVersion
- */
- String getVersion();
-
- /**
* Retrieves a defensively copied data map of the underlying node. A convenience method to retrieving a node and
* getting data from the node directly.
*
* @param fqn
* @return map of data, or an empty map
* @throws CacheException
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
Map<K, V> getData(Fqn fqn);
@@ -412,7 +380,7 @@
* getting keys from the node directly.
*
* @param fqn name of the node
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
Set<K> getKeys(Fqn fqn);
@@ -430,7 +398,7 @@
* getting keys from the node directly.
*
* @param fqn name of the node
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link CacheStatus#STARTED}.
+ * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.horizon.CacheStatus#STARTED}.
*/
void clearData(Fqn fqn);
Modified: core/branches/flat/src/main/java/org/horizon/tree/TreeCacheImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCacheImpl.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/TreeCacheImpl.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,17 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.NodeNotExistsException;
-import org.jboss.cache.Region;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.atomic.AtomicMap;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
+import org.horizon.Cache;
+import org.horizon.CacheException;
+import org.horizon.CacheStatus;
+import org.horizon.atomic.AtomicMap;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.interceptors.base.CommandInterceptor;
import org.jgroups.Address;
import java.util.List;
@@ -232,16 +230,6 @@
}
}
- public Region getRegion(Fqn fqn, boolean createIfAbsent)
- {
- return null; //TODO: Autogenerated. Implement me properly
- }
-
- public boolean removeRegion(Fqn fqn)
- {
- return false; //TODO: Autogenerated. Implement me properly
- }
-
public void move(Fqn nodeToMove, Fqn newParent) throws NodeNotExistsException
{
if (nodeToMove == null || newParent == null) throw new NullPointerException("Cannot accept null parameters!");
@@ -412,11 +400,6 @@
return cache;
}
- public String getVersion()
- {
- return cache.getVersion();
- }
-
public CacheStatus getCacheStatus()
{
return cache.getCacheStatus();
Modified: core/branches/flat/src/main/java/org/horizon/tree/TreeStructureSupport.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeStructureSupport.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/tree/TreeStructureSupport.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.tree;
+package org.horizon.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.atomic.AtomicMap;
-import org.jboss.starobrno.atomic.AtomicMapCache;
-import org.jboss.starobrno.batch.AutoBatchSupport;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
+import org.horizon.atomic.AtomicMap;
+import org.horizon.atomic.AtomicMapCache;
+import org.horizon.batch.AutoBatchSupport;
public class TreeStructureSupport extends AutoBatchSupport
{
@@ -98,7 +98,7 @@
public static boolean isLocked(Cache c, Fqn fqn)
{
- org.jboss.starobrno.lock.LockManager lockManager = ((CacheSPI) c).getLockManager();
+ org.horizon.lock.LockManager lockManager = ((CacheSPI) c).getLockManager();
return lockManager.isLocked(new NodeKey(fqn, NodeKey.Type.STRUCTURE)) &&
lockManager.isLocked(new NodeKey(fqn, NodeKey.Type.DATA));
}
Copied: core/branches/flat/src/main/java/org/horizon/util (from rev 7484, core/branches/flat/src/main/java/org/jboss/starobrno/util)
Modified: core/branches/flat/src/main/java/org/horizon/util/BeanUtils.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/BeanUtils.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/BeanUtils.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.lang.reflect.Method;
import java.util.Locale;
Modified: core/branches/flat/src/main/java/org/horizon/util/FastCopyHashMap.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/FastCopyHashMap.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/FastCopyHashMap.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.io.IOException;
import java.io.Serializable;
Modified: core/branches/flat/src/main/java/org/horizon/util/FileLookup.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/FileLookup.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/FileLookup.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/ImmutableListCopy.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/ImmutableListCopy.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import net.jcip.annotations.Immutable;
Modified: core/branches/flat/src/main/java/org/horizon/util/Immutables.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/Immutables.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/Immutables.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.io.Serializable;
import java.lang.reflect.Array;
Modified: core/branches/flat/src/main/java/org/horizon/util/ObjectDuplicator.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/ObjectDuplicator.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/ObjectDuplicator.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.util.*;
Modified: core/branches/flat/src/main/java/org/horizon/util/ReflectionUtil.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/ReflectionUtil.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/ReflectionUtil.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
Modified: core/branches/flat/src/main/java/org/horizon/util/SimpleImmutableEntry.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/SimpleImmutableEntry.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/SimpleImmutableEntry.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.io.Serializable;
import java.util.Map;
Copied: core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/util/TestingUtil.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,697 @@
+/*
+ * JBoss, the OpenSource J2EE webOS
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+
+package org.horizon.util;
+
+import org.horizon.Cache;
+import org.horizon.CacheDelegate;
+import org.horizon.CacheSPI;
+import org.horizon.CacheStatus;
+import org.horizon.commands.CommandsFactory;
+import org.horizon.commands.VisitableCommand;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.interceptors.InterceptorChain;
+import org.horizon.interceptors.base.CommandInterceptor;
+import org.horizon.lock.LockManager;
+import org.horizon.tree.TreeCache;
+import org.jgroups.JChannel;
+
+import javax.transaction.TransactionManager;
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Utilities for unit testing JBossCache.
+ *
+ * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
+ * @version $Revision$
+ */
+public class TestingUtil
+{
+ private static Random random = new Random();
+
+ /**
+ * Extracts the value of a field in a given target instance using reflection, able to extract private fields as well.
+ *
+ * @param target object to extract field from
+ * @param fieldName name of field to extract
+ * @return field value
+ */
+ public static Object extractField(Object target, String fieldName)
+ {
+ return extractField(target.getClass(), target, fieldName);
+ }
+
+ public static void replaceField(Object newValue, String fieldName, Object owner, Class baseType)
+ {
+ Field field;
+ try
+ {
+ field = baseType.getDeclaredField(fieldName);
+ field.setAccessible(true);
+ field.set(owner, newValue);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);//just to simplify exception handeling
+ }
+ }
+
+
+ public static Object extractField(Class type, Object target, String fieldName)
+ {
+ Field field;
+ try
+ {
+ field = type.getDeclaredField(fieldName);
+ field.setAccessible(true);
+ return field.get(target);
+ }
+ catch (Exception e)
+ {
+ if (type.equals(Object.class))
+ {
+ e.printStackTrace();
+ return null;
+ }
+ else
+ {
+ // try with superclass!!
+ return extractField(type.getSuperclass(), target, fieldName);
+ }
+ }
+ }
+
+ public static <T extends CommandInterceptor> T findInterceptor(CacheSPI<?, ?> cache, Class<T> interceptorToFind)
+ {
+ for (CommandInterceptor i : cache.getInterceptorChain())
+ {
+ if (interceptorToFind.isInstance(i)) return interceptorToFind.cast(i);
+ }
+ return null;
+ }
+
+ /**
+ * Injects an interceptor after a specified interceptor in a running cache. Your new interceptor need not be
+ * initialised with pointers to the next interceptor, etc. as this method does all that for you, including calling
+ * setCache().
+ *
+ * @param cache running cache instance
+ * @param interceptorToInject interceptor instance to inject.
+ * @param interceptorAfterWhichToInject class of interceptor to search for in the chain and after which to add your interceptor
+ */
+ public static void injectInterceptor(CacheSPI<?, ?> cache, CommandInterceptor interceptorToInject, Class<? extends CommandInterceptor> interceptorAfterWhichToInject)
+ {
+ cache.addInterceptor(interceptorToInject, interceptorAfterWhichToInject);
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(Cache[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param caches caches which must all have consistent views
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewsReceived(Cache[] caches, long timeout)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Version of blockUntilViewsReceived that uses varargs
+ */
+ public static void blockUntilViewsReceived(long timeout, Cache... caches)
+ {
+ blockUntilViewsReceived(caches, timeout);
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(CacheSPI[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param caches caches which must all have consistent views
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewsReceived(CacheSPI[] caches, long timeout)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+
+ /**
+ * An overloaded version of {@link #blockUntilViewsReceived(long,Cache[])} that allows for 'shrinking' clusters.
+ * I.e., the usual method barfs if there are more members than expected. This one takes a param (barfIfTooManyMembers) which,
+ * if false, will NOT barf but will wait until the cluster 'shrinks' to the desired size. Useful if in tests, you kill
+ * a member and want to wait until this fact is known across the cluster.
+ *
+ * @param timeout
+ * @param barfIfTooManyMembers
+ * @param caches
+ */
+ public static void blockUntilViewsReceived(long timeout, boolean barfIfTooManyMembers, Cache... caches)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (areCacheViewsComplete(caches, barfIfTooManyMembers))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Loops, continually calling {@link #areCacheViewsComplete(CacheSPI[])}
+ * until it either returns true or <code>timeout</code> ms have elapsed.
+ *
+ * @param groupSize number of caches expected in the group
+ * @param timeout max number of ms to loop
+ * @throws RuntimeException if <code>timeout</code> ms have elapse without
+ * all caches having the same number of members.
+ */
+ public static void blockUntilViewReceived(CacheSPI cache, int groupSize, long timeout)
+ {
+ blockUntilViewReceived(cache, groupSize, timeout, true);
+ }
+
+ public static void blockUntilViewReceived(CacheSPI cache, int groupSize, long timeout, boolean barfIfTooManyMembersInView)
+ {
+ long failTime = System.currentTimeMillis() + timeout;
+
+ while (System.currentTimeMillis() < failTime)
+ {
+ sleepThread(100);
+ if (isCacheViewComplete(cache, groupSize, barfIfTooManyMembersInView))
+ {
+ return;
+ }
+ }
+
+ throw new RuntimeException("timed out before caches had complete views");
+ }
+
+ /**
+ * Checks each cache to see if the number of elements in the array
+ * returned by {@link CacheSPI#getMembers()} matches the size of
+ * the <code>caches</code> parameter.
+ *
+ * @param caches caches that should form a View
+ * @return <code>true</code> if all caches have
+ * <code>caches.length</code> members; false otherwise
+ * @throws IllegalStateException if any of the caches have MORE view
+ * members than caches.length
+ */
+ public static boolean areCacheViewsComplete(Cache[] caches)
+ {
+ return areCacheViewsComplete(caches, true);
+ }
+
+ public static boolean areCacheViewsComplete(Cache[] caches, boolean barfIfTooManyMembers)
+ {
+ int memberCount = caches.length;
+
+ for (int i = 0; i < memberCount; i++)
+ {
+ if (!isCacheViewComplete(caches[i], memberCount, barfIfTooManyMembers))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks each cache to see if the number of elements in the array
+ * returned by {@link RPCManager#getMembers()} matches the size of
+ * the <code>caches</code> parameter.
+ *
+ * @param caches caches that should form a View
+ * @return <code>true</code> if all caches have
+ * <code>caches.length</code> members; false otherwise
+ * @throws IllegalStateException if any of the caches have MORE view
+ * members than caches.length
+ */
+ public static boolean areCacheViewsComplete(CacheSPI[] caches)
+ {
+ if (caches == null) throw new NullPointerException("Cache impl array is null");
+ Cache[] c = new Cache[caches.length];
+ for (int i = 0; i < caches.length; i++) c[i] = caches[i];
+ return areCacheViewsComplete(c);
+ }
+
+ /**
+ * @param cache
+ * @param memberCount
+ */
+ public static boolean isCacheViewComplete(CacheSPI cache, int memberCount)
+ {
+ List members = cache.getRPCManager().getMembers();
+ if (members == null || memberCount > members.size())
+ {
+ return false;
+ }
+ else if (memberCount < members.size())
+ {
+ // This is an exceptional condition
+ StringBuilder sb = new StringBuilder("Cache at address ");
+ sb.append(cache.getRPCManager().getLocalAddress());
+ sb.append(" had ");
+ sb.append(members.size());
+ sb.append(" members; expecting ");
+ sb.append(memberCount);
+ sb.append(". Members were (");
+ for (int j = 0; j < members.size(); j++)
+ {
+ if (j > 0)
+ {
+ sb.append(", ");
+ }
+ sb.append(members.get(j));
+ }
+ sb.append(')');
+
+ throw new IllegalStateException(sb.toString());
+ }
+
+ return true;
+ }
+
+ /**
+ * @param c
+ * @param memberCount
+ */
+ public static boolean isCacheViewComplete(Cache c, int memberCount)
+ {
+ return isCacheViewComplete(c, memberCount, true);
+ }
+
+ public static boolean isCacheViewComplete(Cache c, int memberCount, boolean barfIfTooManyMembers)
+ {
+ CacheSPI cache = (CacheSPI) c;
+ List members = cache.getMembers();
+ if (members == null || memberCount > members.size())
+ {
+ return false;
+ }
+ else if (memberCount < members.size())
+ {
+ if (barfIfTooManyMembers)
+ {
+ // This is an exceptional condition
+ StringBuilder sb = new StringBuilder("Cache at address ");
+ sb.append(cache.getRPCManager().getLocalAddress());
+ sb.append(" had ");
+ sb.append(members.size());
+ sb.append(" members; expecting ");
+ sb.append(memberCount);
+ sb.append(". Members were (");
+ for (int j = 0; j < members.size(); j++)
+ {
+ if (j > 0)
+ {
+ sb.append(", ");
+ }
+ sb.append(members.get(j));
+ }
+ sb.append(')');
+
+ throw new IllegalStateException(sb.toString());
+ }
+ else return false;
+ }
+
+ return true;
+ }
+
+
+ /**
+ * Puts the current thread to sleep for the desired number of ms, suppressing
+ * any exceptions.
+ *
+ * @param sleeptime number of ms to sleep
+ */
+ public static void sleepThread(long sleeptime)
+ {
+ try
+ {
+ Thread.sleep(sleeptime);
+ }
+ catch (InterruptedException ie)
+ {
+ }
+ }
+
+ public static void sleepRandom(int maxTime)
+ {
+ sleepThread(random.nextInt(maxTime));
+ }
+
+ public static void recursiveFileRemove(String directoryName)
+ {
+ File file = new File(directoryName);
+ recursiveFileRemove(file);
+ }
+
+ public static void recursiveFileRemove(File file)
+ {
+ if (file.exists())
+ {
+ System.out.println("Deleting file " + file);
+ recursivedelete(file);
+ }
+ }
+
+ private static void recursivedelete(File f)
+ {
+ if (f.isDirectory())
+ {
+ File[] files = f.listFiles();
+ for (File file : files)
+ {
+ recursivedelete(file);
+ }
+ }
+ //System.out.println("File " + f.toURI() + " deleted = " + f.delete());
+ f.delete();
+ }
+
+ public static void killTreeCaches(Collection treeCaches)
+ {
+ if (treeCaches != null) killTreeCaches((TreeCache[]) treeCaches.toArray(new TreeCache[]{}));
+ }
+
+ public static void killCaches(Collection caches)
+ {
+ if (caches != null) killCaches((Cache[]) caches.toArray(new Cache[]{}));
+ }
+
+ public static void killTreeCaches(TreeCache... treeCaches)
+ {
+ for (TreeCache tc : treeCaches)
+ {
+ if (tc != null) killCaches(tc.getCache());
+ }
+ }
+
+ /**
+ * Kills a cache - stops it, clears any data in any cache loaders, and rolls back any associated txs
+ */
+ public static void killCaches(Cache... caches)
+ {
+ for (Cache c : caches)
+ {
+ try
+ {
+ if (c != null && c.getCacheStatus() == CacheStatus.STARTED)
+ {
+ CacheSPI spi = (CacheSPI) c;
+ if (spi.getTransactionManager() != null)
+ {
+ try
+ {
+ spi.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+
+ // TODO fix cache loader stuff
+ /*
+ CacheLoaderManager clm = spi.getCacheLoaderManager();
+ CacheLoader cl = clm == null ? null : clm.getCacheLoader();
+ if (cl != null)
+ {
+ try
+ {
+ cl.remove(Fqn.ROOT);
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+ */
+
+ spi.stop();
+ }
+ }
+ catch (Throwable t)
+ {
+
+ }
+ }
+ }
+
+ /**
+ * Clears transaction with the current thread in the given transaction manager.
+ *
+ * @param txManager a TransactionManager to be cleared
+ */
+ public static void killTransaction(TransactionManager txManager)
+ {
+ if (txManager != null)
+ {
+ try
+ {
+ txManager.rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+ }
+
+
+ /**
+ * Clears any associated transactions with the current thread in the caches' transaction managers.
+ */
+ public static void killTransactions(Cache... caches)
+ {
+ for (Cache c : caches)
+ {
+ if (c != null && c.getCacheStatus() == CacheStatus.STARTED)
+ {
+ CacheSPI ci = (CacheSPI) c;
+ if (ci.getTransactionManager() != null)
+ {
+ try
+ {
+ ci.getTransactionManager().rollback();
+ }
+ catch (Exception e)
+ {
+ // don't care
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * For testing only - introspects a cache and extracts the ComponentRegistry
+ *
+ * @param cache cache to introspect
+ * @return component registry
+ */
+ public static ComponentRegistry extractComponentRegistry(Cache cache)
+ {
+ return (ComponentRegistry) extractField(cache, "componentRegistry");
+ }
+
+ public static LockManager extractLockManager(Cache cache)
+ {
+ return extractComponentRegistry(cache).getComponent(LockManager.class);
+ }
+
+ /**
+ * For testing only - introspects a cache and extracts the ComponentRegistry
+ *
+ * @param ci interceptor chain to introspect
+ * @return component registry
+ */
+ public static ComponentRegistry extractComponentRegistry(InterceptorChain ci)
+ {
+ return (ComponentRegistry) extractField(ci, "componentRegistry");
+ }
+
+
+ /**
+ * Replaces the existing interceptor chain in the cache wih one represented by the interceptor passed in. This
+ * utility updates dependencies on all components that rely on the interceptor chain as well.
+ *
+ * @param cache cache that needs to be altered
+ * @param interceptor the first interceptor in the new chain.
+ */
+ public static void replaceInterceptorChain(CacheSPI<?, ?> cache, CommandInterceptor interceptor)
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ // make sure all interceptors here are wired.
+ CommandInterceptor i = interceptor;
+ do
+ {
+ cr.wireDependencies(i);
+ }
+ while ((i = i.getNext()) != null);
+
+ InterceptorChain inch = cr.getComponent(InterceptorChain.class);
+ inch.setFirstInChain(interceptor);
+ }
+
+ /**
+ * Retrieves the remote delegate for a given cache. It is on this remote delegate that the JGroups RPCDispatcher
+ * invokes remote methods.
+ *
+ * @param cache cache instance for which a remote delegate is to be retrieved
+ * @return remote delegate, or null if the cacge is not configured for replication.
+ */
+ public static CacheDelegate getInvocationDelegate(CacheSPI cache)
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ return cr.getComponent(CacheDelegate.class);
+ }
+
+ /**
+ * Blocks until the cache has reached a specified state.
+ *
+ * @param cache cache to watch
+ * @param cacheStatus status to wait for
+ * @param timeout timeout to wait for
+ */
+ public static void blockUntilCacheStatusAchieved(Cache cache, CacheStatus cacheStatus, long timeout)
+ {
+ CacheSPI spi = (CacheSPI) cache;
+ long killTime = System.currentTimeMillis() + timeout;
+ while (System.currentTimeMillis() < killTime)
+ {
+ if (spi.getCacheStatus() == cacheStatus) return;
+ sleepThread(50);
+ }
+ throw new RuntimeException("Timed out waiting for condition");
+ }
+
+ public static void replicateCommand(CacheSPI cache, VisitableCommand command) throws Throwable
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ InterceptorChain ic = cr.getComponent(InterceptorChain.class);
+ ic.invoke(command);
+ }
+
+ public static void blockUntilViewsReceived(int timeout, List caches)
+ {
+ blockUntilViewsReceived((Cache[]) caches.toArray(new Cache[]{}), timeout);
+ }
+
+
+ public static CommandsFactory extractCommandsFactory(CacheSPI<Object, Object> cache)
+ {
+ return (CommandsFactory) extractField(cache, "commandsFactory");
+ }
+
+ public static String getJGroupsAttribute(Cache cache, String protocol, String attribute)
+ {
+ String s = ((JChannel) ((CacheSPI) cache).getRPCManager().getChannel()).getProperties();
+ String[] protocols = s.split(":");
+ String attribs = null;
+ for (String p : protocols)
+ {
+ boolean hasAttribs = p.contains("(");
+ String name = hasAttribs ? p.substring(0, p.indexOf('(')) : p;
+ attribs = hasAttribs ? p.substring(p.indexOf('(') + 1, p.length() - 1) : null;
+
+ if (name.equalsIgnoreCase(protocol)) break;
+ }
+
+ if (attribs != null)
+ {
+ String[] attrArray = attribs.split(";");
+ for (String a : attrArray)
+ {
+ String[] kvPairs = a.split("=");
+ if (kvPairs[0].equalsIgnoreCase(attribute)) return kvPairs[1];
+ }
+ }
+ return null;
+ }
+
+ public static void dumpCacheContents(List caches)
+ {
+ System.out.println("**** START: Cache Contents ****");
+ int count = 1;
+ for (Object o : caches)
+ {
+ CacheSPI c = (CacheSPI) o;
+ if (c == null)
+ {
+ System.out.println(" ** Cache " + count + " is null!");
+ }
+ else
+ {
+ System.out.println(" ** Cache " + count + " is " + c.getRPCManager().getLocalAddress());
+// System.out.println(" " + CachePrinter.printCacheDetails(c));
+ }
+ count++;
+ }
+ System.out.println("**** END: Cache Contents ****");
+ }
+
+ public static void dumpCacheContents(Cache... caches)
+ {
+ dumpCacheContents(Arrays.asList(caches));
+ }
+
+ /**
+ * Extracts a component of a given type from the cache's internal component registry
+ *
+ * @param cache
+ * @param componentType
+ * @param <T>
+ * @return
+ */
+ public static <T> T extractComponent(Cache cache, Class<T> componentType)
+ {
+ ComponentRegistry cr = extractComponentRegistry(cache);
+ return cr.getComponent(componentType);
+ }
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/util/TestingUtil.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/util/TypedProperties.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/TypedProperties.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/TypedProperties.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,4 +1,4 @@
-package org.jboss.starobrno.util;
+package org.horizon.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Copied: core/branches/flat/src/main/java/org/horizon/util/UnitTestTestNGListener.java (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/util/UnitTestTestNGListener.java)
===================================================================
--- core/branches/flat/src/main/java/org/horizon/util/UnitTestTestNGListener.java (rev 0)
+++ core/branches/flat/src/main/java/org/horizon/util/UnitTestTestNGListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -0,0 +1,93 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.horizon.util;
+
+import org.testng.IClass;
+import org.testng.ITestContext;
+import org.testng.ITestListener;
+import org.testng.ITestResult;
+
+/**
+ *
+ * @author dpospisi
+ */
+public class UnitTestTestNGListener implements ITestListener {
+
+ /**
+ * Holds test classes actually running in all threads.
+ */
+ private ThreadLocal<IClass> threadTestClass = new ThreadLocal<IClass>();
+
+ private int failed = 0;
+ private int succeded = 0;
+ private int skipped = 0;
+
+ public void onTestStart(ITestResult res) {
+ System.out.println(getThreadId() + " Starting test " + getTestDesc(res));
+
+ /*
+ IClass testClass = threadTestClass.get();
+ if ((testClass != null) && (! res.getTestClass().equals(testClass))) {
+
+ System.out.println(getThreadId() + " New test class" + res.getTestClass() + ", was " + testClass);
+
+ // the thread has started testing a new test class
+
+ // clean all possibly running caches created in current thread
+ boolean cleaned = new UnitTestCacheFactory().cleanUp();
+ if (cleaned) {
+ // previous test left a cache
+ System.out.println(getThreadId() +" WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ System.out.println(getThreadId() +" A test method in " + testClass.getName() + " did not clean all cache instances properly.");
+ System.out.println(getThreadId() +" Use UnitTestCacheFactory.cleanUp() or TestngUtil.killCaches(...) ");
+ System.out.println(getThreadId() +" WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+ }
+ }
+ */
+
+ threadTestClass.set(res.getTestClass());
+ }
+
+ synchronized public void onTestSuccess(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " succeded.");
+ succeded++;
+ printStatus();
+ }
+
+ synchronized public void onTestFailure(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " failed.");
+ failed++;
+ printStatus();
+ }
+
+ synchronized public void onTestSkipped(ITestResult arg0) {
+ System.out.println(getThreadId() + " Test " + getTestDesc(arg0) + " skipped.");
+ skipped++;
+ printStatus();
+ }
+
+ public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {
+ }
+
+ public void onStart(ITestContext arg0) {
+ }
+
+ public void onFinish(ITestContext arg0) {
+ }
+
+ private String getThreadId() {
+ return "["+ Thread.currentThread().getName() + "]";
+ }
+
+ private String getTestDesc(ITestResult res) {
+ return res.getMethod().getMethodName() + "(" + res.getTestClass().getName() + ")";
+ }
+
+ private void printStatus() {
+ System.out.println("Testsuite execution progress: tests succeded " + succeded + ", failed " + failed + ", skipped " + skipped + ".");
+ }
+
+}
Property changes on: core/branches/flat/src/main/java/org/horizon/util/UnitTestTestNGListener.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: core/branches/flat/src/main/java/org/horizon/util/Util.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/Util.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/Util.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util;
+package org.horizon.util;
import java.lang.reflect.Method;
import java.util.HashMap;
@@ -87,50 +87,6 @@
}
/**
- * Calculates the diffs between data maps passed in to {@link org.jboss.cache.notifications.event.NodeModifiedEvent#getData()}
- * before and after modification. This only makes sense if the modification type is {@link org.jboss.cache.notifications.event.NodeModifiedEvent.ModificationType#PUT_MAP}.
- * Refer to {@link org.jboss.cache.notifications.event.NodeModifiedEvent} and {@link org.jboss.cache.notifications.annotation.NodeModified}.
- *
- * @param pre map of data before the node was modified
- * @param post Map of data after the node was modified
- * @return MapModifications containing the differences.
- */
- public static MapModifications diffNodeData(Map<Object, Object> pre, Map<Object, Object> post)
- {
- MapModifications mods = new MapModifications();
-
- // let's start with what's been added and modified.
- for (Map.Entry me : post.entrySet())
- {
- Object key = me.getKey();
- Object value = me.getValue();
- if (pre.containsKey(key))
- {
- if (!value.equals(pre.get(key)))
- {
- mods.modifiedEntries.put(key, value);
- }
- }
- else
- {
- mods.addedEntries.put(key, value);
- }
- }
-
- // now the removed entries.
- for (Map.Entry me : pre.entrySet())
- {
- Object key = me.getKey();
- if (!post.containsKey(key))
- {
- mods.removedEntries.put(key, me.getValue());
- }
- }
-
- return mods;
- }
-
- /**
* Null-safe equality test.
*
* @param a first object to compare
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/BoundedExecutors.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/BoundedExecutors.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/BoundedExecutors.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
import java.util.concurrent.*;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/ConcurrentHashSet.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/ConcurrentHashSet.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/ConcurrentHashSet.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
import java.util.AbstractSet;
import java.util.Collection;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/ReclosableLatch.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/ReclosableLatch.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/ReclosableLatch.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
/**
- * A better impl of {@link org.jboss.cache.util.ThreadGate}, that uses an {@link java.util.concurrent.locks.AbstractQueuedSynchronizer}.
+ * A thread gat, that uses an {@link java.util.concurrent.locks.AbstractQueuedSynchronizer}.
* <p/>
* This implementation allows you to create a latch with a default state (open or closed), and repeatedly open or close
* the latch.
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/SelfInitializingConcurrentHashMap.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/SelfInitializingConcurrentHashMap.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/SelfInitializingConcurrentHashMap.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
import java.util.Collection;
import java.util.Collections;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/SynchronizedRestarter.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/SynchronizedRestarter.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/SynchronizedRestarter.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
-import org.jboss.starobrno.lifecycle.Lifecycle;
+import org.horizon.lifecycle.Lifecycle;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.LockSupport;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/WithinThreadExecutor.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/WithinThreadExecutor.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/WithinThreadExecutor.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent;
+package org.horizon.util.concurrent;
-import org.jboss.starobrno.CacheException;
+import org.horizon.CacheException;
import java.util.Collection;
import java.util.Collections;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/LockContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/locks/LockContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/LockContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent.locks;
+package org.horizon.util.concurrent.locks;
import net.jcip.annotations.ThreadSafe;
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLock.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/locks/OwnableReentrantLock.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLock.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent.locks;
+package org.horizon.util.concurrent.locks;
import net.jcip.annotations.ThreadSafe;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.transaction.GlobalTransaction;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.transaction.GlobalTransaction;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
@@ -31,8 +31,8 @@
/**
* A lock that supports reentrancy based on owner (and not on current thread). For this to work, the lock needs to be
- * constructed with a reference to the {@link org.jboss.cache.invocation.InvocationContextContainer}, so it is able
- * to determine whether the caller's "owner" reference is the current thread or a {@link org.jboss.cache.transaction.GlobalTransaction}
+ * constructed with a reference to the {@link InvocationContextContainer}, so it is able
+ * to determine whether the caller's "owner" reference is the current thread or a {@link GlobalTransaction}
* instance.
* <p/>
* This makes this lock implementation very closely tied to JBoss Cache internals, but it provides for a very clean, efficient
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLockContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/locks/OwnableReentrantLockContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/OwnableReentrantLockContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent.locks;
+package org.horizon.util.concurrent.locks;
import net.jcip.annotations.ThreadSafe;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
+import org.horizon.invocation.InvocationContextContainer;
import java.util.Arrays;
/**
- * A LockContainer that holds {@link org.jboss.starobrno.util.concurrent.locks.OwnableReentrantLock}s.
+ * A LockContainer that holds {@link org.horizon.util.concurrent.locks.OwnableReentrantLock}s.
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @see org.jboss.starobrno.util.concurrent.locks.ReentrantLockContainer
- * @see org.jboss.starobrno.util.concurrent.locks.OwnableReentrantLock
+ * @see org.horizon.util.concurrent.locks.ReentrantLockContainer
+ * @see org.horizon.util.concurrent.locks.OwnableReentrantLock
* @since 3.0
*/
@ThreadSafe
Modified: core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/ReentrantLockContainer.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/util/concurrent/locks/ReentrantLockContainer.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/concurrent/locks/ReentrantLockContainer.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.starobrno.util.concurrent.locks;
+package org.horizon.util.concurrent.locks;
import net.jcip.annotations.ThreadSafe;
@@ -30,7 +30,7 @@
* A LockContainer that holds ReentrantLocks
*
* @author Manik Surtani (<a href="mailto:manik at jboss.org">manik at jboss.org</a>)
- * @see org.jboss.starobrno.util.concurrent.locks.OwnableReentrantLockContainer
+ * @see org.horizon.util.concurrent.locks.OwnableReentrantLockContainer
* @since 3.0
*/
@ThreadSafe
Copied: core/branches/flat/src/main/java/org/horizon/util/internals (from rev 7484, core/branches/flat/src/test/java/org/jboss/starobrno/util/internals)
Modified: core/branches/flat/src/main/java/org/horizon/util/internals/ReplicationListener.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ReplicationListener.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/internals/ReplicationListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,21 +1,21 @@
-package org.jboss.starobrno.util.internals;
+package org.horizon.util.internals;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.remote.ReplicateCommand;
-import org.jboss.starobrno.commands.tx.CommitCommand;
-import org.jboss.starobrno.commands.tx.PrepareCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.io.ByteBuffer;
-import org.jboss.starobrno.marshall.CacheMarshallerStarobrno;
-import org.jboss.starobrno.marshall.CommandAwareRpcDispatcher;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.Cache;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.remote.ReplicateCommand;
+import org.horizon.commands.tx.CommitCommand;
+import org.horizon.commands.tx.PrepareCommand;
+import org.horizon.config.Configuration;
+import org.horizon.context.InvocationContext;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.io.ByteBuffer;
+import org.horizon.marshall.CacheMarshallerStarobrno;
+import org.horizon.marshall.CommandAwareRpcDispatcher;
+import org.horizon.marshall.Marshaller;
+import org.horizon.remoting.RPCManager;
+import org.horizon.util.TestingUtil;
import org.jgroups.blocks.RpcDispatcher;
import org.jgroups.util.Buffer;
@@ -168,9 +168,9 @@
*/
private class RegionMarshallerDelegate extends CacheMarshallerStarobrno
{
- private ExtendedMarshaller realOne;
+ private Marshaller realOne;
- private RegionMarshallerDelegate(ExtendedMarshaller realOne)
+ private RegionMarshallerDelegate(Marshaller realOne)
{
this.realOne = realOne;
}
Modified: core/branches/flat/src/main/java/org/horizon/util/internals/ViewChangeListener.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/util/internals/ViewChangeListener.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/horizon/util/internals/ViewChangeListener.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
-package org.jboss.starobrno.util.internals;
+package org.horizon.util.internals;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.notifications.annotation.CacheListener;
-import org.jboss.starobrno.notifications.annotation.ViewChanged;
-import org.jboss.starobrno.notifications.event.ViewChangedEvent;
+import org.horizon.Cache;
+import org.horizon.notifications.annotation.CacheListener;
+import org.horizon.notifications.annotation.ViewChanged;
+import org.horizon.notifications.event.ViewChangedEvent;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Deleted: core/branches/flat/src/main/java/org/jboss/starobrno/Cache.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/Cache.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/Cache.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno;
-
-import org.jboss.cache.CacheStatus;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.lifecycle.Lifecycle;
-import org.jgroups.Address;
-
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Mircea.Markus at jboss.com
- */
-public interface Cache<K, V> extends ConcurrentMap<K, V>, Lifecycle
-{
- /**
- * Under special operating behavior, associates the value with the specified key.
- * <ul>
- * <li> Only goes through if the key specified does not exist; no-op otherwise (similar to {@link java.util.concurrent.ConcurrentMap#putIfAbsent(Object, Object)})</i>
- * <li> Force asynchronous mode for replication to prevent any blocking.</li>
- * <li> invalidation does not take place. </li>
- * <li> 0ms lock timeout to prevent any blocking here either. If the lock is not acquired, this method is a no-op, and swallows the timeout exception.</li>
- * <li> Ongoing transactions are suspended before this call, so failures here will not affect any ongoing transactions.</li>
- * <li> Errors and exceptions are 'silent' - logged at a much lower level than normal, and this method does not throw exceptions</li>
- * </ul>
- * This method is for caching data that has an external representation in storage, where, concurrent modification and
- * transactions are not a consideration, and failure to put the data in the cache should be treated as a 'suboptimal outcome'
- * rather than a 'failing outcome'.
- * <p/>
- * An example of when this method is useful is when data is read from, for example, a legacy datastore, and is cached before
- * returning the data to the caller. Subsequent calls would prefer to get the data from the cache and if the data doesn't exist
- * in the cache, fetch again from the legacy datastore.
- * <p/>
- * See <a href="http://jira.jboss.com/jira/browse/JBCACHE-848">JBCACHE-848</a> for details around this feature.
- * <p/>
- *
- * @param key key with which the specified value is to be associated.
- * @param value value to be associated with the specified key.
- * @throws IllegalStateException if {@link #getCacheStatus()} would not return {@link org.jboss.cache.CacheStatus#STARTED}.
- */
- void putForExternalRead(K key, V value);
-
- void evict(K key);
-
- Configuration getConfiguration();
-
- void addCacheListener(Object listener);
-
- void removeCacheListener(Object listener);
-
- Set<Object> getCacheListeners();
-
- InvocationContext getInvocationContext();
-
- void setInvocationContext(InvocationContext ctx);
-
- CacheStatus getCacheStatus();
-
- /**
- * @return true if a batch was successfully started; false if one was available and already running.
- */
- public boolean startBatch();
-
- public void endBatch(boolean successful);
-
- List<Address> getMembers();
-
- String getName();
-
- Address getLocalAddress();
-
- String getVersion();
-
- void addInterceptor(CommandInterceptor i, int position);
-
- void addInterceptor(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor);
-
- void removeInterceptor(int position);
-
- void removeInterceptor(Class<? extends CommandInterceptor> interceptorType);
-}
Deleted: core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/CacheDelegate.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,483 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheStatus;
-import org.jboss.cache.Version;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.buddyreplication.GravitateResult;
-import org.jboss.starobrno.atomic.AtomicHashMap;
-import org.jboss.starobrno.atomic.AtomicMap;
-import org.jboss.starobrno.atomic.AtomicMapCache;
-import org.jboss.starobrno.batch.BatchContainer;
-import org.jboss.starobrno.commands.CommandsFactory;
-import org.jboss.starobrno.commands.read.GetKeyValueCommand;
-import org.jboss.starobrno.commands.read.SizeCommand;
-import org.jboss.starobrno.commands.write.ClearCommand;
-import org.jboss.starobrno.commands.write.EvictCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.PutMapCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.commands.write.ReplaceCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.container.DataContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.factories.annotations.Inject;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.interceptors.InterceptorChain;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.loader.CacheLoaderManager;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.statetransfer.StateTransferManager;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jgroups.Address;
-
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Mircea.Markus at jboss.com
- */
- at NonVolatile
-public class CacheDelegate<K, V> implements CacheSPI<K, V>, AtomicMapCache<K, V>
-{
- protected InvocationContextContainer invocationContextContainer;
- protected CommandsFactory commandsFactory;
- protected InterceptorChain invoker;
- protected Configuration config;
- protected Notifier notifier;
- protected BatchContainer batchContainer;
- protected ComponentRegistry componentRegistry;
- protected TransactionManager transactionManager;
- protected RPCManager rpcManager;
- protected ExtendedMarshaller marshaller;
- private String name;
- private EvictionManager evictionManager;
- private DataContainer dataContainer;
- private LockManager lockManager;
- private static final Log log = LogFactory.getLog(CacheDelegate.class);
-
- public CacheDelegate(String name)
- {
- this.name = name;
- }
-
- @Inject
- private void injectDependencies(EvictionManager evictionManager,
- InvocationContextContainer invocationContextContainer,
- CommandsFactory commandsFactory,
- InterceptorChain interceptorChain,
- Configuration configuration,
- Notifier notifier,
- ComponentRegistry componentRegistry,
- TransactionManager transactionManager,
- BatchContainer batchContainer,
- RPCManager rpcManager, DataContainer dataContainer,
- ExtendedMarshaller marshaller,
- LockManager lockManager)
- {
- this.invocationContextContainer = invocationContextContainer;
- this.commandsFactory = commandsFactory;
- this.invoker = interceptorChain;
- this.config = configuration;
- this.notifier = notifier;
- this.componentRegistry = componentRegistry;
- this.transactionManager = transactionManager;
- this.batchContainer = batchContainer;
- this.rpcManager = rpcManager;
- this.evictionManager = evictionManager;
- this.dataContainer = dataContainer;
- this.marshaller = marshaller;
- this.lockManager = lockManager;
- }
-
- public V putIfAbsent(K key, V value)
- {
- PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(key, value);
- command.setPutIfAbsent(true);
- return (V) invoker.invoke(buildCtx(), command);
- }
-
- public boolean remove(Object key, Object value)
- {
- RemoveCommand command = commandsFactory.buildRemoveCommand(key, value);
- return (Boolean) invoker.invoke(buildCtx(), command);
- }
-
- public boolean replace(K key, V oldValue, V newValue)
- {
- ReplaceCommand command = commandsFactory.buildReplaceCommand(key, oldValue, newValue);
- return (Boolean) invoker.invoke(buildCtx(), command);
- }
-
- public V replace(K key, V value)
- {
- ReplaceCommand command = commandsFactory.buildReplaceCommand(key, null, value);
- return (V) invoker.invoke(buildCtx(), command);
- }
-
- public int size()
- {
- SizeCommand command = commandsFactory.buildSizeCommand();
- return (Integer) invoker.invoke(buildCtx(), command);
- }
-
- public boolean isEmpty()
- {
- SizeCommand command = commandsFactory.buildSizeCommand();
- int size = (Integer) invoker.invoke(buildCtx(), command);
- return size == 0;
- }
-
- public boolean containsKey(Object key)
- {
- GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key);
- Object response = invoker.invoke(buildCtx(), command);
- return response != null;
- }
-
- public boolean containsValue(Object value)
- {
- throw new UnsupportedOperationException("Go away");
- }
-
- public V get(Object key)
- {
- GetKeyValueCommand command = commandsFactory.buildGetKeyValueCommand(key);
- return (V) invoker.invoke(buildCtx(), command);
- }
-
- public V put(K key, V value)
- {
- PutKeyValueCommand command = commandsFactory.buildPutKeyValueCommand(key, value);
- return (V) invoker.invoke(buildCtx(), command);
- }
-
- public V remove(Object key)
- {
- RemoveCommand command = commandsFactory.buildRemoveCommand(key, null);
- V oldval = (V) invoker.invoke(buildCtx(), command);
- return oldval;
- }
-
- public void putAll(Map<? extends K, ? extends V> t)
- {
- PutMapCommand command = commandsFactory.buildPutMapCommand(t);
- invoker.invoke(buildCtx(), command);
- }
-
- public void clear()
- {
- ClearCommand command = commandsFactory.buildClearCommand();
- invoker.invoke(buildCtx(), command);
- }
-
- public Set keySet()
- {
- throw new UnsupportedOperationException("Go away");
- }
-
- public Collection values()
- {
- throw new UnsupportedOperationException("Go away");
- }
-
- public Set entrySet()
- {
- throw new UnsupportedOperationException("Go away");
- }
-
- public void putForExternalRead(K key, V value)
- {
- InvocationContext ctx = invocationContextContainer.get();
- Transaction ongoingTransaction = null;
- try
- {
- if (transactionManager != null && (ongoingTransaction = transactionManager.getTransaction()) != null)
- {
- transactionManager.suspend();
- }
-
- // if the node exists then this should be a no-op.
- ctx.getOptionOverrides().setFailSilently(true);
- ctx.getOptionOverrides().setForceAsynchronous(true);
- ctx.getOptionOverrides().setLockAcquisitionTimeout(0);
- putIfAbsent(key, value);
- }
- catch (Exception e)
- {
- if (log.isDebugEnabled()) log.debug("Caught exception while doing putForExternalRead()", e);
- }
- finally
- {
- try
- {
- if (ongoingTransaction != null) transactionManager.resume(ongoingTransaction);
- }
- catch (Exception e)
- {
- log.debug("Had problems trying to resume a transaction after putForExternalread()", e);
- }
- }
- }
-
- public void evict(K key)
- {
- EvictCommand command = commandsFactory.buildEvictCommand(key);
- invoker.invoke(buildCtx(), command);
- }
-
- public Configuration getConfiguration()
- {
- return config;
- }
-
- public void addCacheListener(Object listener)
- {
- notifier.addCacheListener(listener);
- }
-
- public void removeCacheListener(Object listener)
- {
- notifier.removeCacheListener(listener);
- }
-
- public Set getCacheListeners()
- {
- return notifier.getCacheListeners();
- }
-
- public InvocationContext getInvocationContext()
- {
- return invocationContextContainer.get();
- }
-
- public void setInvocationContext(InvocationContext ctx)
- {
- if (ctx == null) invocationContextContainer.remove();
- else invocationContextContainer.set(ctx);
- }
-
- public void start()
- {
- componentRegistry.start();
- }
-
- public void stop()
- {
- componentRegistry.stop();
- if (config.isUsingEviction())
- {
- evictionManager.cacheStopped(getName());
- }
- }
-
- private InvocationContext buildCtx()
- {
- return invocationContextContainer.get();
- }
-
- public TransactionManager getTransactionManager()
- {
- return transactionManager;
- }
-
- public List<CommandInterceptor> getInterceptorChain()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public ExtendedMarshaller getMarshaller()
- {
- return marshaller;
- }
-
- public void addInterceptor(CommandInterceptor i, int position)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public void addInterceptor(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public void removeInterceptor(int position)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public void removeInterceptor(Class<? extends CommandInterceptor> interceptorType)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public CacheLoaderManager getCacheLoaderManager()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public BuddyManager getBuddyManager()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public TransactionTable getTransactionTable()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public EvictionManager getEvictionManager()
- {
- return evictionManager;
- }
-
- public RPCManager getRPCManager()
- {
- return rpcManager;
- }
-
- public StateTransferManager getStateTransferManager()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public Notifier getNotifier()
- {
- return notifier;
- }
-
- public String getClusterName()
- {
- return config.getClusterName();
- }
-
- public GlobalTransaction getCurrentTransaction(Transaction tx, boolean createIfNotExists)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public GlobalTransaction getCurrentTransaction()
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public GravitateResult gravitateData(K key, boolean searchBuddyBackupSubtrees, InvocationContext ctx)
- {
- throw new IllegalStateException();//todo Implement me properly
- }
-
- public ComponentRegistry getComponentRegistry()
- {
- return componentRegistry;
- }
-
- public CacheStatus getCacheStatus()
- {
- return componentRegistry.getState();
- }
-
- public boolean startBatch()
- {
- if (!config.isInvocationBatchingEnabled())
- throw new ConfigurationException("Invocation batching not enabled in current configuration! Please use the <invocationBatching /> element.");
- return batchContainer.startBatch();
- }
-
- public void endBatch(boolean successful)
- {
- if (!config.isInvocationBatchingEnabled())
- throw new ConfigurationException("Invocation batching not enabled in current configuration! Please use the <invocationBatching /> element.");
- batchContainer.endBatch(successful);
- }
-
- public List<Address> getMembers()
- {
- return rpcManager.getMembers();
- }
-
- public Object getDirect(Object key)
- {
- throw new UnsupportedOperationException("Not implemented");//todo please implement!
- }
-
- public LockManager getLockManager()
- {
- return lockManager;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getVersion()
- {
- return Version.getVersionString(Version.getVersionShort());
- }
-
- public Address getLocalAddress()
- {
- return rpcManager.getLocalAddress();
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @Override
- public String toString()
- {
- return dataContainer == null ? super.toString() : dataContainer.toString();
- }
-
- public AtomicMap getAtomicMap(K key) throws ClassCastException
- {
- Object value = get(key);
- if (value == null) value = AtomicHashMap.newInstance(this, key);
- return ((AtomicHashMap) value).getProxy(this, key);
- }
-
- public <AMK, AMV> AtomicMap<AMK, AMV> getAtomicMap(K key, Class<AMK> atomicMapKeyType, Class<AMV> atomicMapValueType) throws ClassCastException
- {
- return getAtomicMap(key);
- }
-
- public BatchContainer getBatchContainer()
- {
- return batchContainer;
- }
-}
Deleted: core/branches/flat/src/main/java/org/jboss/starobrno/CacheException.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/CacheException.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/CacheException.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno;
-
-/**
- * Thrown when operations on {@link Cache} or {@link org.jboss.cache.Node} fail unexpectedly.
- * <p/>
- * Specific subclasses such as {@link org.jboss.starobrno.lock.TimeoutException}, {@link org.jboss.cache.config.ConfigurationException} and {@link org.jboss.cache.lock.LockingException}
- * have more specific uses.
- *
- * @author <a href="mailto:bela at jboss.org">Bela Ban</a>
- * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
- */
-public class CacheException extends RuntimeException
-{
-
- private static final long serialVersionUID = -4386393072593859164L;
-
- public CacheException()
- {
- super();
- }
-
- public CacheException(Throwable cause)
- {
- super(cause);
- }
-
- public CacheException(String msg)
- {
- super(msg);
- }
-
- public CacheException(String msg, Throwable cause)
- {
- super(msg, cause);
- }
-}
\ No newline at end of file
Deleted: core/branches/flat/src/main/java/org/jboss/starobrno/CacheSPI.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/CacheSPI.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/CacheSPI.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,220 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.starobrno;
-
-import net.jcip.annotations.ThreadSafe;
-import org.jboss.cache.Node;
-import org.jboss.cache.NodeSPI;
-import org.jboss.cache.buddyreplication.BuddyManager;
-import org.jboss.cache.buddyreplication.GravitateResult;
-import org.jboss.cache.marshall.Marshaller;
-import org.jboss.starobrno.batch.BatchContainer;
-import org.jboss.starobrno.context.InvocationContext;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.interceptors.base.CommandInterceptor;
-import org.jboss.starobrno.loader.CacheLoader;
-import org.jboss.starobrno.loader.CacheLoaderManager;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.marshall.ExtendedMarshaller;
-import org.jboss.starobrno.notifications.Notifier;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.statetransfer.StateTransferManager;
-import org.jboss.starobrno.transaction.GlobalTransaction;
-import org.jboss.starobrno.transaction.TransactionTable;
-
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import java.util.List;
-
-/**
- * A more detailed interface to {@link Cache}, which is used when writing plugins for or extending JBoss Cache. A reference
- * to this interface should only be obtained when it is passed in to your code, for example when you write an
- * {@link org.jboss.cache.interceptors.base.CommandInterceptor} or {@link CacheLoader}.
- * <p/>
- * <B><I>You should NEVER attempt to directly cast a {@link Cache} instance to this interface. In future, the implementation may not allow it.</I></B>
- * <p/>
- * This interface contains overridden method signatures of some methods from {@link Cache}, overridden to ensure return
- * types of {@link Node} are replaced with {@link NodeSPI}.
- * <p/>
- *
- * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
- * @see NodeSPI
- * @see Cache
- * @see org.jboss.cache.loader.CacheLoader
- * @since 2.0.0
- */
- at ThreadSafe
-public interface CacheSPI<K, V> extends Cache<K, V>
-{
- /**
- * Retrieves a reference to a running {@link javax.transaction.TransactionManager}, if one is configured.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return a TransactionManager
- */
- TransactionManager getTransactionManager();
-
- /**
- * Retrieves the current Interceptor chain.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return an immutable {@link List} of {@link org.jboss.cache.interceptors.base.CommandInterceptor}s configured for this cache, or
- * <code>null</code> if {@link Cache#create() create()} has not been invoked
- * and the interceptors thus do not exist.
- */
- List<CommandInterceptor> getInterceptorChain();
-
- /**
- * Retrieves an instance of a {@link Marshaller}, which is capable of
- * converting Java objects to bytestreams and back in an efficient manner, which is
- * also interoperable with bytestreams produced/consumed by other versions of JBoss
- * Cache.
- * <p/>
- * The use of this marshaller is the <b>recommended</b> way of creating efficient,
- * compatible, byte streams from objects.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return an instance of {@link Marshaller}
- */
- ExtendedMarshaller getMarshaller();
-
- /**
- * Retrieves the current CacheCacheLoaderManager instance associated with the current Cache instance.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return Retrieves a reference to the currently configured {@link org.jboss.cache.loader.CacheLoaderManager} if one or more cache loaders are configured, null otherwise.
- */
- CacheLoaderManager getCacheLoaderManager();
-
- /**
- * Retrieves the current BuddyManager instance associated with the current Cache instance.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return an instance of {@link BuddyManager} if buddy replication is enabled, null otherwise.
- */
- BuddyManager getBuddyManager();
-
- /**
- * Retrieves the current TransactionTable instance associated with the current Cache instance.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return the current {@link TransactionTable}
- */
- TransactionTable getTransactionTable();
-
-
- EvictionManager getEvictionManager();
-
- /**
- * Gets a handle of the RPC manager.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return the {@link org.jboss.cache.RPCManager} configured.
- */
- RPCManager getRPCManager();
-
- /**
- * Retrieves the current StateTransferManager instance associated with the current Cache instance.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return the current {@link org.jboss.starobrno.statetransfer.StateTransferManager}
- */
- StateTransferManager getStateTransferManager();
-
- /**
- * Retrieves the current Notifier instance associated with the current Cache instance.
- * <p/>
- * From 2.1.0, Interceptor authors should obtain this by injection rather than this method. See the
- * {@link org.jboss.cache.factories.annotations.Inject} annotation.
- *
- * @return the notifier attached with this instance of the cache. See {@link org.jboss.cache.notifications.Notifier}, a class
- * that is responsible for emitting notifications to registered CacheListeners.
- */
- Notifier getNotifier();
-
- /**
- * @return the name of the cluster. Null if running in local mode.
- */
- String getClusterName();
-
- /**
- * Returns the global transaction for this local transaction.
- * Optionally creates a new global transaction if it does not exist.
- *
- * @param tx the current transaction
- * @param createIfNotExists if true creates a new transaction if none exists
- * @return a GlobalTransaction
- */
- GlobalTransaction getCurrentTransaction(Transaction tx, boolean createIfNotExists);
-
- /**
- * Returns the transaction associated with the current thread.
- * If a local transaction exists, but doesn't yet have a mapping to a
- * GlobalTransaction, a new GlobalTransaction will be created and mapped to
- * the local transaction. Note that if a local transaction exists, but is
- * not ACTIVE or PREPARING, null is returned.
- *
- * @return A GlobalTransaction, or null if no (local) transaction was associated with the current thread
- */
- GlobalTransaction getCurrentTransaction();
-
- /**
- * Used with buddy replication's data gravitation interceptor. If marshalling is necessary, ensure that the cache is
- * configured to use {@link org.jboss.cache.config.Configuration#useRegionBasedMarshalling} and the {@link org.jboss.cache.Region}
- * pertaining to the Fqn passed in is activated, and has an appropriate ClassLoader.
- *
- * @param fqn the fqn to gravitate
- * @param searchBuddyBackupSubtrees if true, buddy backup subtrees are searched and if false, they are not.
- * @param ctx
- * @return a GravitateResult which contains the data for the gravitation
- */
- GravitateResult gravitateData(K key, boolean searchBuddyBackupSubtrees, InvocationContext ctx);
-
- /**
- * Returns the component registry associated with this cache instance.
- *
- * @see org.jboss.cache.factories.ComponentRegistry
- */
- ComponentRegistry getComponentRegistry();
-
- Object getDirect(Object key);
-
- LockManager getLockManager();
-
- BatchContainer getBatchContainer();
-}
Deleted: core/branches/flat/src/main/java/org/jboss/starobrno/EvictionManager.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/EvictionManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/EvictionManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,40 +0,0 @@
-package org.jboss.starobrno;
-
-import net.jcip.annotations.ThreadSafe;
-import org.jboss.starobrno.eviction.EvictionCacheManager;
-import org.jboss.starobrno.factories.annotations.NonVolatile;
-import org.jboss.starobrno.factories.scopes.Scope;
-import org.jboss.starobrno.factories.scopes.Scopes;
-
-/**
- * @author Mircea.Markus at jboss.com
- */
- at ThreadSafe
- at NonVolatile
- at Scope(Scopes.NAMED_CACHE)
-public interface EvictionManager
-{
- /**
- * Whenever a new cache is created this method should be called.
- * If this cache does not have eviction enabled then this is a no-op.
- * If the cache has eviction enabled then it is reistered for receivinge eviction information.
- * If this is the first cache that requires eviction, the eviction theread will be started.
- *
- * @param cacheName
- * @param cacheManager newly create cache.
- */
- public void cacheCreated(String cacheName, EvictionCacheManager cacheManager);
-
-
- /**
- * Whenever a cache will be stoped this method should be called.
- * If the given cache doesn't have eviction enabled this is an no-op.
- * If this is the only cache that has eviction enabled, then the eviction thread will be stopped.
- * After calling this method the given cache will be unregistered from eviction events.
- *
- * @param cacheName
- */
- public void cacheStopped(String cacheName);
-
- public void runEviction();
-}
Modified: core/branches/flat/src/main/resources/config-samples/all.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/all.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/all.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -18,7 +18,7 @@
Used to register a transaction manager and participate in ongoing transactions.
-->
<transaction
- transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"
+ transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"
syncRollbackPhase="false"
syncCommitPhase="false"/>
@@ -197,7 +197,7 @@
<!--cache.jdbc.table.create=true-->
<!--cache.jdbc.table.drop=true-->
<!--</properties>-->
- <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
+ <singletonStore enabled="true" class="org.horizon.loader.SingletonStoreCacheLoader">
<properties>
pushStateWhenCoordinator=true
pushStateWhenCoordinatorTimeout=20000
Modified: core/branches/flat/src/main/resources/config-samples/buddy-replication.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/buddy-replication.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/buddy-replication.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering mode="replication">
<!--
Modified: core/branches/flat/src/main/resources/config-samples/cacheloader-enabled.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/cacheloader-enabled.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/cacheloader-enabled.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<!-- Specific eviction policy configurations -->
<eviction wakeUpInterval="5000">
Modified: core/branches/flat/src/main/resources/config-samples/eviction-enabled.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/eviction-enabled.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/eviction-enabled.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<!--
wakeUpInterval: time interval (millis) when the eviction thread kicks in.
Modified: core/branches/flat/src/main/resources/config-samples/external-jgroups-file.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/external-jgroups-file.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/external-jgroups-file.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<async/>
Modified: core/branches/flat/src/main/resources/config-samples/invalidation-async.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/invalidation-async.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/invalidation-async.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering mode="invalidation">
<!--
Modified: core/branches/flat/src/main/resources/config-samples/local.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/local.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/local.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -4,5 +4,5 @@
<!-- By not specifying the 'clustering' element, the cache runs in LOCAL mode. -->
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
</jbosscache>
Modified: core/branches/flat/src/main/resources/config-samples/multiplexer-enabled.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/multiplexer-enabled.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/multiplexer-enabled.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<sync/>
Modified: core/branches/flat/src/main/resources/config-samples/total-replication.xml
===================================================================
--- core/branches/flat/src/main/resources/config-samples/total-replication.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/main/resources/config-samples/total-replication.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
<!-- Configure the TransactionManager -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering mode="replication">
<!-- JGroups protocol stack properties. -->
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/BasicTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/BasicTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/BasicTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -23,10 +23,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.manager.CacheManager;
-import org.jboss.starobrno.manager.NamedCacheNotFoundException;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.manager.CacheManager;
+import org.horizon.manager.NamedCacheNotFoundException;
+import org.horizon.util.TestingUtil;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.testng.annotations.Test;
@Test(groups = "functional")
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheFactory.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -9,11 +9,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.config.parsing.XmlConfigurationParserJBC3;
-import org.jboss.starobrno.manager.CacheManager;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.config.parsing.XmlConfigurationParserJBC3;
+import org.horizon.manager.CacheManager;
+import org.horizon.util.TestingUtil;
+import org.horizon.Cache;
import org.jgroups.conf.XmlConfigurator;
import java.io.InputStream;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/UnitTestCacheManager.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -5,7 +5,8 @@
package org.jboss.starobrno;
-import org.jboss.starobrno.config.Configuration;
+import org.horizon.config.Configuration;
+import org.horizon.Cache;
/**
* @author dpospisi
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheAPITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,14 +1,14 @@
package org.jboss.starobrno.api;
import org.jboss.cache.CacheFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.transaction.DummyTransactionManager;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import org.testng.annotations.AfterMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/CacheSPITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,10 +1,10 @@
package org.jboss.starobrno.api;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.Configuration.CacheMode;
-import org.jboss.starobrno.util.TestingUtil;
-import org.jboss.starobrno.util.internals.ViewChangeListener;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.config.Configuration.CacheMode;
+import org.horizon.util.TestingUtil;
+import org.horizon.util.internals.ViewChangeListener;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/AbstractBatchTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/AbstractBatchTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/AbstractBatchTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
package org.jboss.starobrno.api.batch;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import java.util.concurrent.atomic.AtomicReference;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithTM.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,11 +1,11 @@
package org.jboss.starobrno.api.batch;
import org.jboss.cache.CacheFactory;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/batch/BatchWithoutTM.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,11 +1,11 @@
package org.jboss.starobrno.api.batch;
import org.jboss.cache.CacheFactory;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.ConfigurationException;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.config.ConfigurationException;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
@Test(groups = "functional")
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockAssert.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockAssert.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockAssert.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
package org.jboss.starobrno.api.mvcc;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.util.TestingUtil;
-import org.jboss.starobrno.util.concurrent.locks.LockContainer;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.lock.LockManager;
+import org.horizon.util.TestingUtil;
+import org.horizon.util.concurrent.locks.LockContainer;
/**
* Helper class to assert lock status in MVCC
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/LockTestBase.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,15 +2,15 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.Cache;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.lock.TimeoutException;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.lock.LockManager;
+import org.horizon.lock.TimeoutException;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/PutForExternalReadTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/PutForExternalReadTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/PutForExternalReadTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,18 +3,18 @@
import org.easymock.EasyMock;
import static org.easymock.EasyMock.*;
import org.jboss.cache.CacheFactory;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.commands.ReplicableCommand;
-import org.jboss.starobrno.commands.write.PutKeyValueCommand;
-import org.jboss.starobrno.commands.write.RemoveCommand;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.remoting.RPCManager;
-import org.jboss.starobrno.transaction.TransactionTable;
-import org.jboss.starobrno.util.TestingUtil;
-import org.jboss.starobrno.util.internals.ReplicationListener;
+import org.horizon.commands.ReplicableCommand;
+import org.horizon.commands.write.PutKeyValueCommand;
+import org.horizon.commands.write.RemoveCommand;
+import org.horizon.config.Configuration;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.remoting.RPCManager;
+import org.horizon.transaction.TransactionTable;
+import org.horizon.util.TestingUtil;
+import org.horizon.util.internals.ReplicationListener;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/CacheAPIMVCCTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/CacheAPIMVCCTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/CacheAPIMVCCTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
package org.jboss.starobrno.api.mvcc.read_committed;
-import org.jboss.cache.lock.IsolationLevel;
+import org.horizon.lock.IsolationLevel;
import org.jboss.starobrno.api.CacheAPITest;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/ReadCommittedLockTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/ReadCommittedLockTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/read_committed/ReadCommittedLockTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
package org.jboss.starobrno.api.mvcc.read_committed;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import org.jboss.starobrno.api.mvcc.LockTestBase;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/CacheAPIMVCCTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/CacheAPIMVCCTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/CacheAPIMVCCTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
package org.jboss.starobrno.api.mvcc.repeatable_read;
-import org.jboss.cache.lock.IsolationLevel;
+import org.horizon.lock.IsolationLevel;
import org.jboss.starobrno.api.CacheAPITest;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/RepeatableReadLockTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -5,7 +5,7 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
@Test(groups = {"functional", "mvcc"})
public class RepeatableReadLockTest extends LockTestBase
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/mvcc/repeatable_read/WriteSkewTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,14 +1,14 @@
package org.jboss.starobrno.api.mvcc.repeatable_read;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.Cache;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheFactory;
import org.jboss.starobrno.api.mvcc.LockAssert;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.lock.LockManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeAPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeAPITest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeAPITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,15 +1,15 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManager;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.Node;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.Node;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeLockSupport.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeLockSupport.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeLockSupport.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -23,12 +23,12 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeStructureSupport;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
+import org.horizon.lock.LockManager;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeStructureSupport;
import javax.transaction.TransactionManager;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeMoveAPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeMoveAPITest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeMoveAPITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,20 +2,20 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.NodeNotExistsException;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.tree.NodeNotExistsException;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
import org.jboss.starobrno.api.mvcc.LockAssert;
-import org.jboss.starobrno.config.CacheLoaderConfig;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.config.parsing.XmlConfigHelper;
-import org.jboss.starobrno.config.parsing.element.LoadersElementParser;
-import org.jboss.starobrno.factories.ComponentRegistry;
-import org.jboss.starobrno.invocation.InvocationContextContainer;
-import org.jboss.starobrno.lock.LockManager;
-import org.jboss.starobrno.tree.*;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.CacheLoaderConfig;
+import org.horizon.config.Configuration;
+import org.horizon.config.parsing.XmlConfigHelper;
+import org.horizon.config.parsing.element.LoadersElementParser;
+import org.horizon.factories.ComponentRegistry;
+import org.horizon.invocation.InvocationContextContainer;
+import org.horizon.lock.LockManager;
+import org.horizon.tree.*;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeReplicatedMoveTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeReplicatedMoveTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/NodeReplicatedMoveTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -7,13 +7,13 @@
package org.jboss.starobrno.api.tree;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.Node;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.Node;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
import org.testng.annotations.AfterMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -7,15 +7,15 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.Node;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.Node;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTxTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTxTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/SyncReplTxTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -7,16 +7,16 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.Node;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.Node;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeCacheAPITest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeCacheAPITest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeCacheAPITest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,15 +1,15 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.manager.CacheManager;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.Node;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
+import org.horizon.config.Configuration;
+import org.horizon.manager.CacheManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.Node;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeStructureHashCodeTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeStructureHashCodeTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/api/tree/TreeStructureHashCodeTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,9 +1,9 @@
package org.jboss.starobrno.api.tree;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.NodeKey;
-import org.jboss.starobrno.util.concurrent.locks.LockContainer;
-import org.jboss.starobrno.util.concurrent.locks.ReentrantLockContainer;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.NodeKey;
+import org.horizon.util.concurrent.locks.LockContainer;
+import org.horizon.util.concurrent.locks.ReentrantLockContainer;
import org.testng.annotations.Test;
import java.util.ArrayList;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/AbstractProfileTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,8 +1,8 @@
package org.jboss.starobrno.profiling;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.Cache;
+import org.horizon.config.Configuration;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/MemConsumptionTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -21,10 +21,10 @@
*/
package org.jboss.starobrno.profiling;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.manager.CacheManager;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.Cache;
+import org.horizon.CacheException;
+import org.horizon.manager.CacheManager;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
import java.io.IOException;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/ProfileTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,12 +2,12 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.config.Configuration;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.Cache;
+import org.horizon.config.Configuration;
import org.jboss.starobrno.profiling.testinternals.Generator;
import org.jboss.starobrno.profiling.testinternals.TaskRunner;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
import java.util.ArrayList;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/TreeProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/TreeProfileTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/TreeProfileTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,17 +2,17 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.Cache;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheFactory;
-import org.jboss.starobrno.config.Configuration;
+import org.horizon.config.Configuration;
import org.jboss.starobrno.profiling.testinternals.Generator;
import org.jboss.starobrno.profiling.testinternals.TaskRunner;
-import org.jboss.starobrno.transaction.DummyTransactionManager;
-import org.jboss.starobrno.tree.Fqn;
-import org.jboss.starobrno.tree.TreeCache;
-import org.jboss.starobrno.tree.TreeCacheImpl;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.tree.Fqn;
+import org.horizon.tree.TreeCache;
+import org.horizon.tree.TreeCacheImpl;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/profiling/testinternals/Generator.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/profiling/testinternals/Generator.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/profiling/testinternals/Generator.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
package org.jboss.starobrno.profiling.testinternals;
-import org.jboss.starobrno.tree.Fqn;
+import org.horizon.tree.Fqn;
import java.util.ArrayList;
import java.util.List;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/AsyncReplTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -8,13 +8,13 @@
package org.jboss.starobrno.replication;
-import org.jboss.starobrno.Cache;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.Cache;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
-import org.jboss.starobrno.util.internals.ReplicationListener;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
+import org.horizon.util.internals.ReplicationListener;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ExceptionTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,11 +1,11 @@
package org.jboss.starobrno.replication;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.lock.TimeoutException;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.lock.TimeoutException;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/ReplicationExceptionTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -7,12 +7,12 @@
*/
package org.jboss.starobrno.replication;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManager;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.fail;
import org.testng.annotations.AfterMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncCacheListenerTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -9,19 +9,19 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.starobrno.CacheException;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.lock.IsolationLevel;
+import org.horizon.CacheException;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.notifications.annotation.CacheEntryModified;
-import org.jboss.starobrno.notifications.annotation.CacheEntryRemoved;
-import org.jboss.starobrno.notifications.annotation.CacheListener;
-import org.jboss.starobrno.notifications.event.Event;
-import org.jboss.starobrno.notifications.event.TransactionalEvent;
-import org.jboss.starobrno.transaction.DummyTransactionManager;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.notifications.annotation.CacheEntryModified;
+import org.horizon.notifications.annotation.CacheEntryRemoved;
+import org.horizon.notifications.annotation.CacheListener;
+import org.horizon.notifications.event.Event;
+import org.horizon.notifications.event.TransactionalEvent;
+import org.horizon.transaction.DummyTransactionManager;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/replication/SyncReplTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -10,10 +10,10 @@
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import org.jboss.starobrno.Cache;
+import org.horizon.Cache;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.util.TestingUtil;
-import org.jboss.starobrno.config.Configuration;
+import org.horizon.util.TestingUtil;
+import org.horizon.config.Configuration;
/**
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
Modified: core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java
===================================================================
--- core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/java/org/jboss/starobrno/tx/LocalModeTxTest.java 2009-01-16 14:06:35 UTC (rev 7485)
@@ -21,11 +21,11 @@
*/
package org.jboss.starobrno.tx;
-import org.jboss.starobrno.CacheSPI;
+import org.horizon.CacheSPI;
import org.jboss.starobrno.UnitTestCacheManager;
-import org.jboss.starobrno.config.Configuration;
-import org.jboss.starobrno.transaction.DummyTransactionManagerLookup;
-import org.jboss.starobrno.util.TestingUtil;
+import org.horizon.config.Configuration;
+import org.horizon.transaction.DummyTransactionManagerLookup;
+import org.horizon.util.TestingUtil;
import org.testng.annotations.Test;
import javax.transaction.Transaction;
Modified: core/branches/flat/src/test/resources/configs/buddy-replication-cache.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/buddy-replication-cache.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/buddy-replication-cache.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering clusterName="JBossCache-Cluster">
<sync replTimeout="15000"/>
Modified: core/branches/flat/src/test/resources/configs/clonable-config.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/clonable-config.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/clonable-config.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="SERIALIZABLE" lockAcquisitionTimeout="1"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering clusterName="CloneCluster">
<stateRetrieval fetchInMemoryState="false" timeout="3"/>
<jgroupsConfig multiplexerStack="udp">
@@ -128,7 +128,7 @@
</properties>
</singletonStore>
</loader>
- <loader class="org.jboss.cache.loader.ClusteredCacheLoader" async="false" fetchPersistentState="false"
+ <loader class="org.horizon.loader.ClusteredCacheLoader" async="false" fetchPersistentState="false"
ignoreModifications="false">
<properties>
timeout=500
Modified: core/branches/flat/src/test/resources/configs/local-lru-eviction.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/local-lru-eviction.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/local-lru-eviction.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering clusterName="JBossCache-Cluster">
<stateRetrieval timeout="20000"/>
</clustering>
Modified: core/branches/flat/src/test/resources/configs/local-passivation.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/local-passivation.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/local-passivation.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<eviction wakeUpInterval="1000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
<property name="maxNodes" value="5000"/>
Modified: core/branches/flat/src/test/resources/configs/local-tx.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/local-tx.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/local-tx.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
Modified: core/branches/flat/src/test/resources/configs/mixedPolicy-eviction.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/mixedPolicy-eviction.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/mixedPolicy-eviction.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,7 +3,7 @@
xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<stateRetrieval timeout="20000"/>
<jgroupsConfig configFile="udp.xml"/>
Modified: core/branches/flat/src/test/resources/configs/mux.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/mux.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/mux.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<stateRetrieval timeout="20000"/>
<jgroupsConfig multiplexerStack="tcp"/>
Modified: core/branches/flat/src/test/resources/configs/mvcc-repl-sync-br.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/mvcc-repl-sync-br.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/mvcc-repl-sync-br.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns="urn:jboss:starobrno-core:config:1.0">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<stateRetrieval fetchInMemoryState="false"/>
<jgroupsConfig>
Modified: core/branches/flat/src/test/resources/configs/named-cache-test.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/named-cache-test.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/named-cache-test.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -3,27 +3,27 @@
<global>
- <asyncListenerExecutor factory="org.jboss.starobrno.executors.DefaultExecutorFactory">
+ <asyncListenerExecutor factory="org.horizon.executors.DefaultExecutorFactory">
<property name="maxThreads">5</property>
<property name="threadNamePrefix">AsyncListenerThread</property>
</asyncListenerExecutor>
- <asyncSerializationExecutor factory="org.jboss.starobrno.executors.DefaultExecutorFactory">
+ <asyncSerializationExecutor factory="org.horizon.executors.DefaultExecutorFactory">
<property name="maxThreads">25</property>
<property name="threadNamePrefix">AsyncSerializationThread</property>
</asyncSerializationExecutor>
- <evictionScheduledExecutor factory="org.jboss.starobrno.executors.DefaultScheduledExecutorFactory">
+ <evictionScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
<property name="threadNamePrefix">EvictionThread</property>
</evictionScheduledExecutor>
- <replicationQueueScheduledExecutor factory="org.jboss.starobrno.executors.DefaultScheduledExecutorFactory">
+ <replicationQueueScheduledExecutor factory="org.horizon.executors.DefaultScheduledExecutorFactory">
<property name="threadNamePrefix">ReplicationQueueThread</property>
</replicationQueueScheduledExecutor>
<jgroupsConfig configFile="udp.xml"/>
- <serialization marshallerClass="org.jboss.starobrno.marshall.CacheMarshallerStarobrno" version="1.0"
+ <serialization marshallerClass="org.horizon.marshall.CacheMarshallerStarobrno" version="1.0"
objectInputStreamPoolSize="100" objectOutputStreamPoolSize="100"/>
</global>
@@ -33,7 +33,7 @@
</default>
<namedCache name="transactional">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
</namedCache>
<namedCache name="syncRepl">
@@ -45,7 +45,7 @@
</namedCache>
<namedCache name="txSyncRepl">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering>
<stateRetrieval fetchInMemoryState="true" timeout="15000"/>
<sync replTimeout="15000"/>
Modified: core/branches/flat/src/test/resources/configs/parser-test-async.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/parser-test-async.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/parser-test-async.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -9,7 +9,7 @@
<locking isolationLevel="REPEATABLE_READ" lockParentForChildInsertRemove="true" lockAcquisitionTimeout="10234"
writeSkewCheck="false" concurrencyLevel="21"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="false"/>
@@ -85,7 +85,7 @@
cache.jdbc.table.create=true
cache.jdbc.table.drop=true
</properties>
- <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
+ <singletonStore enabled="true" class="org.horizon.loader.SingletonStoreCacheLoader">
<properties>
pushStateWhenCoordinator=true
pushStateWhenCoordinatorTimeout=20000
Modified: core/branches/flat/src/test/resources/configs/parser-test.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/parser-test.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/parser-test.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -10,7 +10,7 @@
writeSkewCheck="false" concurrencyLevel="21"/>
<!-- perCM -->
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"
syncRollbackPhase="true" syncCommitPhase="true"/>
<jmxStatistics enabled="false"/>
@@ -73,7 +73,7 @@
cache.jdbc.table.create=true
cache.jdbc.table.drop=true
</properties>
- <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
+ <singletonStore enabled="true" class="org.horizon.loader.SingletonStoreCacheLoader">
<properties>
pushStateWhenCoordinator=true
pushStateWhenCoordinatorTimeout=20000
Modified: core/branches/flat/src/test/resources/configs/policyPerRegion-eviction.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/policyPerRegion-eviction.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/policyPerRegion-eviction.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<clustering clusterName="JBossCache-Cluster123"/>
<eviction wakeUpInterval="5000">
<default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm">
Modified: core/branches/flat/src/test/resources/configs/replSync.xml
===================================================================
--- core/branches/flat/src/test/resources/configs/replSync.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/configs/replSync.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:starobrno-core:config:1.0">
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
<clustering>
<stateRetrieval fetchInMemoryState="true" timeout="15000"/>
Modified: core/branches/flat/src/test/resources/jbc3-registry-configs.xml
===================================================================
--- core/branches/flat/src/test/resources/jbc3-registry-configs.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/jbc3-registry-configs.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -15,7 +15,7 @@
<registry:cache-config name="optimistic-entity">
<locking lockAcquisitionTimeout="15000" nodeLockingScheme="optimistic"/>
<transaction syncCommitPhase="true" syncRollbackPhase="true"
- transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
<stateRetrieval fetchInMemoryState="false" timeout="20000"/>
@@ -24,7 +24,7 @@
<sync replTimeout="20000"/>
</invalidation>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -47,7 +47,7 @@
<sync replTimeout="20000"/>
</invalidation>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -63,9 +63,9 @@
-->
<registry:cache-config name="local-query">
<locking lockAcquisitionTimeout="15000" nodeLockingScheme="optimistic"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -81,7 +81,7 @@
-->
<registry:cache-config name="replicated-query">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="optimistic"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
<startup regionsInactiveOnStartup="false"/>
<stateRetrieval fetchInMemoryState="false" timeout="20000"/>
@@ -90,7 +90,7 @@
<async/>
</replication>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -115,7 +115,7 @@
<async/>
</replication>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -134,7 +134,7 @@
<registry:cache-config name="optimistic-shared">
<locking lockAcquisitionTimeout="15000" nodeLockingScheme="optimistic"/>
<transaction syncCommitPhase="true" syncRollbackPhase="true"
- transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="true"/>
<startup regionsInactiveOnStartup="true"/>
<stateRetrieval fetchInMemoryState="true" timeout="20000"/>
@@ -143,7 +143,7 @@
<sync replTimeout="20000"/>
</replication>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
@@ -172,7 +172,7 @@
<sync replTimeout="20000"/>
</replication>
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.starobrno.eviction.algorithms.lru.LRUAlgorithm">
+ <default algorithmClass="org.horizon.eviction.algorithms.lru.LRUAlgorithm">
<attribute name="maxNodes">5000</attribute>
<attribute name="timeToLive">1000</attribute>
</default>
Modified: core/branches/flat/src/test/resources/unit-test-cache-service.xml
===================================================================
--- core/branches/flat/src/test/resources/unit-test-cache-service.xml 2009-01-16 11:59:25 UTC (rev 7484)
+++ core/branches/flat/src/test/resources/unit-test-cache-service.xml 2009-01-16 14:06:35 UTC (rev 7485)
@@ -2,7 +2,7 @@
<jbosscache xmlns="urn:jboss:starobrno-core:config:1.0">
<locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000"/>
- <transaction transactionManagerLookupClass="org.jboss.starobrno.transaction.GenericTransactionManagerLookup"/>
+ <transaction transactionManagerLookupClass="org.horizon.transaction.GenericTransactionManagerLookup"/>
<serialization useRegionBasedMarshalling="false"/>
<clustering>
<sync replTimeout="15000"/>
More information about the jbosscache-commits
mailing list