private synchronized void inciarRest(wrapperKs wp) throws InterruptedException {

		try {



			int NumeroObjetosXJson = 10 ; 
			int NumeroObjTemp = 0 ; 


			List temp = wp.getRecords();
			List objetosJSON = new ArrayList<>() ;	




			for(int i=0;i < wp.total() ; i++ )
			{	

				_counter.addCounter();
				while (_counter.getCounter() == MAXQUEUE) {
					System.out.println("Esperando Cupo...");
					sleep(1000);
				}

				if(NumeroObjTemp < NumeroObjetosXJson - 1 &&  NumeroObjetosXJson > i && NumeroObjetosXJson < wp.total() )
				{
					Object record =  temp.get(i);
					objetosJSON.add(record);
					NumeroObjTemp ++ ; 
				}

				else 
				{
					Object record =  temp.get(i);
					objetosJSON.add(record);
					NumeroObjTemp ++ ; 
					wrapperKs wpTemp = new wrapperKs(objetosJSON,wp.getRecordType());


					if(wpTemp.total() > 0 )
					{

						String json = wpTemp.getWrapperJson(wpTemp);

						consumirRest hilo1 = new consumirRest(json);
						hilo1.start();

					}
					objetosJSON.clear() ;	
					NumeroObjTemp = 0 ; 


				}

			}


		} catch (Exception e) {
			e.printStackTrace();
		}



	}