Merge branches 'ignite-843' and 'ignite-sprint-7' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-843
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/08ac7ea4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/08ac7ea4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/08ac7ea4 Branch: refs/heads/ignite-843 Commit: 08ac7ea42fe1451c6158c459c0ac70b201fda3c5 Parents: ac52e0d ec9cfca Author: Andrey <anovi...@gridgain.com> Authored: Mon Jun 22 08:47:36 2015 +0700 Committer: Andrey <anovi...@gridgain.com> Committed: Mon Jun 22 08:47:36 2015 +0700 ---------------------------------------------------------------------- DEVNOTES.txt | 15 + RELEASE_NOTES.txt | 12 + examples/config/example-cache.xml | 2 + examples/pom.xml | 2 +- idea/ignite_codeStyle.xml | 147 +++++ modules/aop/pom.xml | 2 +- modules/aws/pom.xml | 2 +- .../s3/S3CheckpointManagerSelfTest.java | 2 +- .../checkpoint/s3/S3CheckpointSpiSelfTest.java | 4 +- .../s3/S3CheckpointSpiStartStopSelfTest.java | 2 +- .../s3/S3SessionCheckpointSelfTest.java | 2 +- .../s3/TcpDiscoveryS3IpFinderSelfTest.java | 2 +- modules/clients/pom.xml | 2 +- .../client/router/TcpSslRouterSelfTest.java | 5 + .../client/suite/IgniteClientTestSuite.java | 3 +- modules/cloud/pom.xml | 2 +- .../cloud/TcpDiscoveryCloudIpFinder.java | 25 +- .../TcpDiscoveryCloudIpFinderSelfTest.java | 3 +- modules/codegen/pom.xml | 2 +- modules/core/pom.xml | 2 +- .../apache/ignite/cache/query/ScanQuery.java | 23 +- .../cache/store/jdbc/CacheJdbcBlobStore.java | 22 +- .../store/jdbc/CacheJdbcBlobStoreFactory.java | 290 +++++++++ .../cache/store/jdbc/CacheJdbcPojoStore.java | 6 +- .../store/jdbc/CacheJdbcPojoStoreFactory.java | 148 +++++ .../configuration/CacheConfiguration.java | 3 +- .../ignite/internal/GridKernalContextImpl.java | 5 +- .../ignite/internal/GridPluginContext.java | 6 + .../apache/ignite/internal/IgniteKernal.java | 13 +- .../internal/MarshallerContextAdapter.java | 48 +- .../ignite/internal/MarshallerContextImpl.java | 24 +- .../client/GridClientConfiguration.java | 2 +- .../GridClientOptimizedMarshaller.java | 26 + .../impl/GridTcpRouterNioListenerAdapter.java | 2 +- .../internal/interop/InteropBootstrap.java | 3 +- .../internal/interop/InteropIgnition.java | 57 +- .../internal/interop/InteropProcessor.java | 8 + .../discovery/GridDiscoveryManager.java | 9 +- .../affinity/AffinityTopologyVersion.java | 7 - .../processors/cache/GridCacheAdapter.java | 4 + .../processors/cache/GridCacheIoManager.java | 64 +- .../processors/cache/GridCacheMessage.java | 51 -- .../GridCachePartitionExchangeManager.java | 70 +- .../processors/cache/GridCacheProcessor.java | 61 +- .../processors/cache/GridCacheUtils.java | 9 + .../processors/cache/IgniteCacheProxy.java | 12 + .../processors/cache/KeyCacheObjectImpl.java | 11 +- .../distributed/GridCacheTxRecoveryRequest.java | 26 +- .../GridCacheTxRecoveryResponse.java | 14 +- .../distributed/GridDistributedBaseMessage.java | 77 +-- .../distributed/GridDistributedLockRequest.java | 54 +- .../GridDistributedLockResponse.java | 14 +- .../GridDistributedTxFinishRequest.java | 46 +- .../GridDistributedTxPrepareRequest.java | 62 +- .../GridDistributedTxPrepareResponse.java | 64 +- .../GridDistributedUnlockRequest.java | 6 +- .../distributed/dht/GridDhtLocalPartition.java | 56 +- .../distributed/dht/GridDhtLockRequest.java | 72 +- .../distributed/dht/GridDhtLockResponse.java | 18 +- .../dht/GridDhtPartitionTopologyImpl.java | 4 +- .../dht/GridDhtPartitionsReservation.java | 292 +++++++++ .../dht/GridDhtTransactionalCacheAdapter.java | 2 +- .../distributed/dht/GridDhtTxFinishRequest.java | 38 +- .../dht/GridDhtTxPrepareRequest.java | 54 +- .../dht/GridDhtTxPrepareResponse.java | 22 +- .../distributed/dht/GridDhtUnlockRequest.java | 6 +- .../cache/distributed/dht/GridReservable.java | 35 + .../dht/preloader/GridDhtPartitionMap.java | 26 +- .../dht/preloader/GridDhtPreloader.java | 2 +- .../distributed/near/GridNearLockRequest.java | 58 +- .../distributed/near/GridNearLockResponse.java | 26 +- .../near/GridNearTxFinishRequest.java | 26 +- .../near/GridNearTxPrepareRequest.java | 50 +- .../near/GridNearTxPrepareResponse.java | 46 +- .../distributed/near/GridNearUnlockRequest.java | 2 +- .../cache/query/GridCacheQueryManager.java | 38 +- .../cache/query/GridCacheTwoStepQuery.java | 22 +- .../cache/transactions/IgniteTxHandler.java | 5 +- .../transactions/IgniteTxLocalAdapter.java | 12 +- .../cacheobject/IgniteCacheObjectProcessor.java | 9 +- .../IgniteCacheObjectProcessorImpl.java | 12 +- .../continuous/GridContinuousProcessor.java | 15 +- .../datastreamer/DataStreamerCacheUpdaters.java | 2 +- .../datastreamer/DataStreamerImpl.java | 8 +- .../datastructures/DataStructuresProcessor.java | 67 +- .../dr/IgniteDrDataStreamerCacheUpdater.java | 7 +- .../plugin/IgnitePluginProcessor.java | 16 +- .../portable/GridPortableInputStream.java | 10 + .../processors/query/GridQueryIndexing.java | 14 +- .../processors/query/GridQueryProcessor.java | 125 ++-- .../messages/GridQueryNextPageResponse.java | 35 +- .../h2/twostep/messages/GridQueryRequest.java | 111 +++- .../rest/client/message/GridRouterRequest.java | 18 + .../rest/client/message/GridRouterResponse.java | 18 + .../rest/protocols/tcp/GridTcpRestProtocol.java | 3 +- .../processors/task/GridTaskProcessor.java | 23 +- .../apache/ignite/internal/util/GridDebug.java | 19 + .../ignite/internal/util/IgniteUtils.java | 24 + .../util/ipc/shmem/IpcSharedMemoryUtils.java | 4 +- .../util/spring/IgniteSpringHelper.java | 10 + .../internal/visor/VisorMultiNodeTask.java | 2 +- .../ignite/marshaller/MarshallerContext.java | 8 + .../org/apache/ignite/plugin/PluginContext.java | 6 + .../SpringApplicationContextResource.java | 4 +- .../apache/ignite/resources/SpringResource.java | 6 +- .../org/apache/ignite/spi/IgniteSpiAdapter.java | 28 +- .../communication/tcp/TcpCommunicationSpi.java | 44 +- .../ignite/spi/discovery/tcp/ClientImpl.java | 498 +++++++++----- .../ignite/spi/discovery/tcp/ServerImpl.java | 258 ++++---- .../spi/discovery/tcp/TcpDiscoveryImpl.java | 66 ++ .../spi/discovery/tcp/TcpDiscoverySpi.java | 42 +- .../tcp/internal/TcpDiscoveryNode.java | 18 + .../ipfinder/TcpDiscoveryIpFinderAdapter.java | 34 +- .../TcpDiscoveryMulticastIpFinder.java | 19 +- .../messages/TcpDiscoveryAbstractMessage.java | 10 +- .../java/org/jsr166/ConcurrentHashMap8.java | 8 +- .../java/org/jsr166/ConcurrentLinkedDeque8.java | 586 ++++++----------- .../src/main/java/org/jsr166/LongAdder8.java | 35 +- .../core/src/main/java/org/jsr166/README.txt | 11 + .../src/main/java/org/jsr166/Striped64_8.java | 22 +- .../java/org/jsr166/ThreadLocalRandom8.java | 19 +- .../src/main/java/org/jsr166/package-info.java | 12 +- .../core/src/main/resources/ignite.properties | 2 +- modules/core/src/test/config/tests.properties | 2 +- .../ignite/GridSuppressedExceptionSelfTest.java | 4 +- .../internal/GridDiscoveryEventSelfTest.java | 6 +- ...ridFailFastNodeFailureDetectionSelfTest.java | 2 + .../GridFailoverTaskWithPredicateSelfTest.java | 3 - .../GridJobMasterLeaveAwareSelfTest.java | 2 - .../internal/GridJobStealingSelfTest.java | 3 - ...ectionLocalJobMultipleArgumentsSelfTest.java | 2 - .../apache/ignite/internal/GridSelfTest.java | 28 +- .../GridTaskExecutionContextSelfTest.java | 9 - .../GridTaskFailoverAffinityRunTest.java | 170 +++++ .../IgniteComputeEmptyClusterGroupTest.java | 3 - .../IgniteComputeTopologyExceptionTest.java | 9 - .../GridDiscoveryManagerAliveCacheSelfTest.java | 22 +- .../cache/CacheClientStoreSelfTest.java | 228 +++++++ ...acheReadOnlyTransactionalClientSelfTest.java | 327 ---------- .../CacheStoreUsageMultinodeAbstractTest.java | 305 +++++++++ ...eUsageMultinodeDynamicStartAbstractTest.java | 169 +++++ ...oreUsageMultinodeDynamicStartAtomicTest.java | 32 + ...heStoreUsageMultinodeDynamicStartTxTest.java | 32 + ...reUsageMultinodeStaticStartAbstractTest.java | 158 +++++ ...toreUsageMultinodeStaticStartAtomicTest.java | 32 + ...cheStoreUsageMultinodeStaticStartTxTest.java | 32 + .../GridCacheAbstractFailoverSelfTest.java | 8 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 24 +- .../cache/GridCacheAbstractSelfTest.java | 3 - .../cache/GridCacheAffinityRoutingSelfTest.java | 4 +- .../cache/GridCacheDeploymentSelfTest.java | 3 - .../cache/GridCacheEntryMemorySizeSelfTest.java | 91 +-- .../cache/GridCacheMemoryModeSelfTest.java | 2 - ...ridCacheMultinodeUpdateAbstractSelfTest.java | 9 + ...inodeUpdateNearEnabledNoBackupsSelfTest.java | 2 +- ...CacheMultinodeUpdateNearEnabledSelfTest.java | 2 +- .../processors/cache/GridCacheOffHeapTest.java | 28 +- .../GridCacheReferenceCleanupSelfTest.java | 3 - .../processors/cache/GridCacheStopSelfTest.java | 5 + .../cache/GridCacheVersionMultinodeTest.java | 6 +- .../IgniteCacheAbstractStopBusySelfTest.java | 30 +- .../cache/IgniteCacheAbstractTest.java | 3 - .../IgniteCacheAtomicStopBusySelfTest.java | 8 +- .../IgniteCacheEntryListenerAbstractTest.java | 14 +- .../IgniteCacheInterceptorSelfTestSuite.java | 2 +- .../cache/IgniteCacheInvokeReadThroughTest.java | 5 + ...CacheP2pUnmarshallingRebalanceErrorTest.java | 15 +- .../IgniteCacheP2pUnmarshallingTxErrorTest.java | 25 +- ...gniteCacheTransactionalStopBusySelfTest.java | 13 +- ...teStartCacheInTransactionAtomicSelfTest.java | 32 + .../IgniteStartCacheInTransactionSelfTest.java | 254 ++++++++ .../IgniteTxMultiThreadedAbstractTest.java | 4 +- ...cheAtomicReferenceMultiNodeAbstractTest.java | 11 - ...GridCacheQueueMultiNodeAbstractSelfTest.java | 2 - ...dCacheQueueMultiNodeConsistencySelfTest.java | 5 + ...CacheQueueRotativeMultiNodeAbstractTest.java | 10 - .../GridCacheSetAbstractSelfTest.java | 9 - ...omicOffheapQueueCreateMultiNodeSelfTest.java | 5 + ...ionedAtomicQueueCreateMultiNodeSelfTest.java | 5 + ...rtitionedDataStructuresFailoverSelfTest.java | 5 + ...edOffheapDataStructuresFailoverSelfTest.java | 5 + ...PartitionedQueueCreateMultiNodeSelfTest.java | 5 + ...dCachePartitionedQueueEntryMoveSelfTest.java | 5 + ...nedQueueFailoverDataConsistencySelfTest.java | 5 + ...eplicatedDataStructuresFailoverSelfTest.java | 5 + ...CacheLoadingConcurrentGridStartSelfTest.java | 5 + .../GridCacheAbstractJobExecutionTest.java | 3 - ...ridCachePartitionNotLoadedEventSelfTest.java | 82 +++ .../GridCachePreloadLifecycleAbstractTest.java | 2 - .../IgniteCacheClientNodeConcurrentStart.java | 14 +- .../distributed/IgniteCacheManyClientsTest.java | 190 +++++- .../IgniteCacheTxMessageRecoveryTest.java | 5 + ...heAbstractTransformWriteThroughSelfTest.java | 3 - .../GridCacheColocatedTxExceptionSelfTest.java | 5 + ...ePartitionedNearDisabledMetricsSelfTest.java | 4 +- ...dCachePartitionedTopologyChangeSelfTest.java | 5 + .../near/GridCacheNearEvictionSelfTest.java | 3 - ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 2 +- .../near/GridCacheNearTxExceptionSelfTest.java | 5 + ...PartitionedFullApiMultithreadedSelfTest.java | 5 + ...idCachePartitionedHitsAndMissesSelfTest.java | 3 - .../GridCachePartitionedNodeRestartTest.java | 5 + ...ePartitionedOptimisticTxNodeRestartTest.java | 5 + ...CachePartitionedTxMultiThreadedSelfTest.java | 5 + .../GridCachePartitionedTxSalvageSelfTest.java | 37 +- ...eReplicatedFullApiMultithreadedSelfTest.java | 5 + .../GridCacheReplicatedInvalidateSelfTest.java | 4 +- ...ridCacheReplicatedMultiNodeLockSelfTest.java | 5 + .../GridCacheReplicatedMultiNodeSelfTest.java | 5 + .../GridCacheReplicatedNodeRestartSelfTest.java | 5 + .../GridCacheReplicatedTxExceptionSelfTest.java | 5 + .../replicated/GridReplicatedTxPreloadTest.java | 2 + ...acheAtomicReplicatedNodeRestartSelfTest.java | 5 + .../GridCacheEvictionFilterSelfTest.java | 4 +- ...cheSynchronousEvictionsFailoverSelfTest.java | 5 + .../IgniteCacheExpiryPolicyAbstractTest.java | 10 +- ...eCacheExpiryPolicyWithStoreAbstractTest.java | 4 +- ...dCacheLocalFullApiMultithreadedSelfTest.java | 5 + .../GridCacheLocalTxExceptionSelfTest.java | 5 + .../GridCacheSwapScanQueryAbstractSelfTest.java | 3 - ...ridCacheContinuousQueryAbstractSelfTest.java | 2 - ...CacheClientWriteBehindStoreAbstractTest.java | 104 +++ ...teCacheClientWriteBehindStoreAtomicTest.java | 38 ++ .../IgnteCacheClientWriteBehindStoreTxTest.java | 32 + .../closure/GridClosureProcessorSelfTest.java | 29 +- .../continuous/GridEventConsumeSelfTest.java | 2 - .../DataStreamProcessorSelfTest.java | 47 +- .../DataStreamerMultiThreadedSelfTest.java | 3 + .../processors/igfs/IgfsModesSelfTest.java | 4 +- .../internal/util/nio/GridNioSelfTest.java | 13 +- .../internal/util/nio/GridNioSslSelfTest.java | 2 + .../unsafe/GridUnsafeMemorySelfTest.java | 4 +- .../tostring/GridToStringBuilderSelfTest.java | 4 +- .../marshaller/MarshallerContextTestImpl.java | 29 +- .../ignite/messaging/GridMessagingSelfTest.java | 3 - .../GridP2PContinuousDeploymentSelfTest.java | 2 + .../p2p/GridP2PLocalDeploymentSelfTest.java | 6 +- .../p2p/GridP2PRemoteClassLoadersSelfTest.java | 31 +- .../spi/GridTcpSpiForwardingSelfTest.java | 3 - .../tcp/TcpClientDiscoverySpiSelfTest.java | 183 +++++- .../spi/discovery/tcp/TcpDiscoverySelfTest.java | 44 +- .../ignite/testframework/GridTestUtils.java | 14 + .../config/GridTestProperties.java | 14 +- .../junits/GridTestKernalContext.java | 3 +- .../junits/IgniteTestResources.java | 16 +- .../junits/common/GridCommonAbstractTest.java | 15 +- .../ignite/testsuites/IgniteBasicTestSuite.java | 29 +- .../IgniteCacheDataStructuresSelfTestSuite.java | 24 +- .../IgniteCacheEvictionSelfTestSuite.java | 3 +- .../IgniteCacheFailoverTestSuite.java | 24 +- .../IgniteCacheFailoverTestSuite2.java | 47 ++ .../IgniteCacheFullApiSelfTestSuite.java | 8 +- ...niteCacheP2pUnmarshallingErrorTestSuite.java | 20 +- .../testsuites/IgniteCacheRestartTestSuite.java | 10 +- .../ignite/testsuites/IgniteCacheTestSuite.java | 48 +- .../testsuites/IgniteCacheTestSuite2.java | 4 +- .../testsuites/IgniteCacheTestSuite3.java | 14 +- .../testsuites/IgniteCacheTestSuite4.java | 19 +- .../IgniteCacheWriteBehindTestSuite.java | 2 + .../testsuites/IgniteComputeGridTestSuite.java | 1 + .../testsuites/IgniteKernalSelfTestSuite.java | 16 +- .../IgniteMarshallerSelfTestSuite.java | 28 +- .../testsuites/IgniteUtilSelfTestSuite.java | 18 +- .../apache/ignite/util/GridRandomSelfTest.java | 4 +- .../ignite/util/TestTcpCommunicationSpi.java | 21 + modules/extdata/p2p/pom.xml | 2 +- .../tests/p2p/P2PTestTaskExternalPath1.java | 10 +- .../tests/p2p/P2PTestTaskExternalPath2.java | 8 +- modules/extdata/uri/pom.xml | 2 +- modules/gce/pom.xml | 2 +- modules/geospatial/pom.xml | 2 +- modules/hadoop/pom.xml | 2 +- .../HadoopIgfs20FileSystemAbstractSelfTest.java | 4 +- .../IgniteHadoopFileSystemAbstractSelfTest.java | 2 +- .../processors/hadoop/HadoopMapReduceTest.java | 21 +- .../collections/HadoopHashMapSelfTest.java | 4 +- .../HadoopExternalTaskExecutionSelfTest.java | 2 + .../HadoopExternalCommunicationSelfTest.java | 5 + .../testsuites/IgniteHadoopTestSuite.java | 7 +- modules/hibernate/pom.xml | 16 +- .../hibernate/CacheHibernateBlobStore.java | 87 +-- .../CacheHibernateBlobStoreFactory.java | 235 +++++++ .../hibernate/src/test/config/factory-cache.xml | 59 ++ .../src/test/config/factory-cache1.xml | 61 ++ .../config/factory-incorrect-store-cache.xml | 56 ++ .../hibernate/HibernateL2CacheSelfTest.java | 5 + .../HibernateL2CacheTransactionalSelfTest.java | 5 + .../CacheHibernateStoreFactorySelfTest.java | 273 ++++++++ .../testsuites/IgniteHibernateTestSuite.java | 6 +- modules/indexing/pom.xml | 18 +- .../processors/query/h2/IgniteH2Indexing.java | 79 ++- .../query/h2/sql/GridSqlQuerySplitter.java | 49 +- .../query/h2/twostep/GridMapQueryExecutor.java | 332 +++++++--- .../query/h2/twostep/GridMergeIndex.java | 17 +- .../h2/twostep/GridMergeIndexUnsorted.java | 7 +- .../h2/twostep/GridReduceQueryExecutor.java | 650 ++++++++++++++++--- .../query/h2/twostep/GridResultPage.java | 21 +- .../CacheAbstractQueryMetricsSelfTest.java | 205 ++++++ .../CachePartitionedQueryMetricsSelfTest.java | 32 + .../CacheReplicatedQueryMetricsSelfTest.java | 32 + .../cache/GridCacheCrossCacheQuerySelfTest.java | 13 +- .../cache/GridCacheOffHeapSelfTest.java | 1 - .../cache/GridCacheQueryMetricsSelfTest.java | 206 ------ ...idCacheReduceQueryMultithreadedSelfTest.java | 10 - .../processors/cache/GridCacheSwapSelfTest.java | 3 - .../IgniteCacheAbstractFieldsQuerySelfTest.java | 13 +- .../cache/IgniteCacheAbstractQuerySelfTest.java | 2 - ...hePartitionedQueryMultiThreadedSelfTest.java | 40 +- .../IgniteCacheQueryMultiThreadedSelfTest.java | 2 - ...QueryOffheapEvictsMultiThreadedSelfTest.java | 5 + ...lientQueryReplicatedNodeRestartSelfTest.java | 419 ++++++++++++ .../IgniteCacheQueryNodeRestartSelfTest.java | 41 +- .../IgniteCacheQueryNodeRestartSelfTest2.java | 383 +++++++++++ ...dCacheAbstractReduceFieldsQuerySelfTest.java | 1 - .../h2/GridIndexingSpiAbstractSelfTest.java | 4 +- .../query/h2/sql/BaseH2CompareQueryTest.java | 6 +- .../query/h2/sql/GridQueryParsingTest.java | 5 +- .../IgniteCacheQuerySelfTestSuite.java | 10 +- modules/jcl/pom.xml | 2 +- modules/jta/pom.xml | 2 +- modules/log4j/pom.xml | 2 +- modules/mesos/README.txt | 2 +- modules/mesos/pom.xml | 2 +- .../apache/ignite/mesos/ClusterProperties.java | 15 + .../apache/ignite/mesos/IgniteScheduler.java | 10 +- modules/rest-http/pom.xml | 2 +- modules/scalar-2.10/pom.xml | 2 +- modules/scalar/pom.xml | 2 +- modules/schedule/pom.xml | 2 +- modules/schema-import/pom.xml | 2 +- modules/slf4j/pom.xml | 2 +- modules/spark-2.10/pom.xml | 2 +- modules/spark/pom.xml | 40 +- modules/spring/pom.xml | 9 +- .../GridResourceSpringBeanInjector.java | 2 +- .../util/spring/IgniteSpringHelperImpl.java | 17 + .../src/test/config/incorrect-store-cache.xml | 57 ++ modules/spring/src/test/config/node.xml | 43 ++ modules/spring/src/test/config/node1.xml | 45 ++ .../test/config/pojo-incorrect-store-cache.xml | 56 ++ modules/spring/src/test/config/store-cache.xml | 59 ++ modules/spring/src/test/config/store-cache1.xml | 62 ++ .../jdbc/CacheJdbcBlobStoreFactorySelfTest.java | 172 +++++ .../jdbc/CacheJdbcPojoStoreFactorySelfTest.java | 193 ++++++ .../testsuites/IgniteSpringTestSuite.java | 5 + modules/ssh/pom.xml | 2 +- modules/tools/pom.xml | 2 +- .../ignite/tools/classgen/ClassesGenerator.java | 30 +- modules/urideploy/pom.xml | 2 +- modules/visor-console-2.10/pom.xml | 2 +- modules/visor-console/pom.xml | 2 +- modules/visor-plugins/pom.xml | 2 +- modules/web/pom.xml | 2 +- .../IgniteWebSessionSelfTestSuite.java | 2 +- modules/yardstick/pom.xml | 2 +- parent/pom.xml | 1 + pom.xml | 2 +- 357 files changed, 9773 insertions(+), 3053 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/08ac7ea4/pom.xml ----------------------------------------------------------------------